Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #9245

Re: Exporting a formula to Excel via copypaste

From Thomas Melehan <tpmelehan@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Exporting a formula to Excel via copypaste
Date 2012-03-28 05:34 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <jku7u3$8js$1@smc.vnet.net> (permalink)
References <201203221050.FAA08801@smc.vnet.net> <jkh5jg$jtr$1@smc.vnet.net> <201203260647.BAA21460@smc.vnet.net>

Show all headers | View raw


Murta: Your function was helpful.  Do you happen to have one that goes 
from Excel to Mathematica?



On Mar 26, 2012, at 2:47 AM, Murta wrote:

> On 23 mar, 03:35, Bob Hanlon <hanlonr...@gmail.com> wrote:
>> The two parts of the constant term will automatically combine.
>> InputForm uses asterisks.
>>
>> -0.00488067 + 0.000981042 dff + 0.000109406 dff^2 + 1.83066*10^-8 // InputForm
>>
>> -0.0048806516934 + 0.000981042*dff + 0.000109406*dff^2
>>
>> My Excel (Excel for Mac 2011) accepts numbers of the form 1.83066*10^-8
>>
>> Bob Hanlon
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On Thu, Mar 22, 2012 at 6:50 AM,  <ruesch...@gmail.com> wrote:
>>> Hi there
>>
>>> I'm trying to copy a fromula from mathematica a and paste it to excel. It is a  polynomial. Something like:
>>
>>> -0.00488067+0.000981042 dff+0.000109406 dff^2+1.83066*10^-8
>>
>>> Now, there are two problems:
>>> - The exponential is written as 10^-8. Which is not compatible with excel. This issue can be solve by using ScientificForm.
>>> - The second problem: Excel wants asterisks (*) for the multiplication.  This is solved by doing it this way: ScientificForm[rhofit, NumberMultiplier -> "*"]
>>
>>> Now, the problem is, that NumberMultiplier only adds asterisks where you have number, but not if you have variables. Any idea to replace the spaces with asterisks?
>>
>>> Any help would be highly appreciated.
>>> Philipp
>>
>> --
>> Bob Hanlon
>
> Hi All
> I use excel a lot, so I create this function to copy things to
> clipboard:
>
>  CopyTable2Clipboard[expr_] := Module[{nb, expr2 = Map[NumberForm[#,
> NumberPoint -> ","] &, expr, {-1}]//TableForm},
> 		 nb = CreateDocument[Null, Visible -> False, WindowSelected ->
> True];
> 		 NotebookWrite[nb, Cell[ToBoxes@expr2, "Output"], All];
> 		 FrontEndExecute[FrontEndToken[nb, "CopySpecial"]];
> 		 NotebookClose@nb];
>
> I use it in one personal pack, so it's always avaliable when
> mathematica starts.
> My excel use comma as decimal separator, so I have to use this
> Map[NumberForm[#, NumberPoint -> ","] part, maybe you not.
> best regards
> Murta
>

Back to comp.soft-sys.math.mathematica | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: Exporting a formula to Excel via copypaste Bob Hanlon <hanlonr357@gmail.com> - 2012-03-23 06:35 +0000
  Re: Exporting a formula to Excel via copypaste Murta <rodrigomurtax@gmail.com> - 2012-03-26 06:49 +0000
  Re: Exporting a formula to Excel via copypaste Thomas Melehan <tpmelehan@gmail.com> - 2012-03-28 05:34 +0000
  Re: Exporting a formula to Excel via copypaste Murta <rodrigomurtax@gmail.com> - 2012-04-01 07:40 +0000

csiph-web