Re: How to modify an Excel file
- To: mathgroup at smc.vnet.net
- Subject: [mg95333] Re: How to modify an Excel file
- From: dh <dh at metrohm.com>
- Date: Thu, 15 Jan 2009 06:14:56 -0500 (EST)
- References: <gkkf19$gn9$1@smc.vnet.net>
Hi,
assume that you have an Excell sheet with 1,2 in the first row and 3,4
in the second row saved to a file "d:/tmp/t.xls". Read it in Mathematica by:
d = Import["d:/tmp/t.xls"]
this gives: {{{1., 2.}, {3., 4.}}}
now we add 10 to every cell and save it in "d:/tmp/t1.xls"by:
d=d+10;
Export["d:/tmp/t1.xls", d]
If you open this file, you will see that all the cells are changed.
hope this helps, Daniel
ADL wrote:
> Dear group, I am using Mathematica 6/7 export/import capabilities of
> Excel files, and they work fine. The only problem is that, as far as I
> understood, they cannot work with cell formats. This means that I
> could not find a way to import an Excel file, modify a cell and then
> export it in a new file with the same formatting as the original.
>
> Is there, to your knowledge, a way to let Mathematica write a value in
> a cell of an existing Excel file without using "Excel Link" and
> without modifying the cell's format?
>
> I have both Mathematica and Excel installed on my PC.
>
> Hope some of you has a solution!
>
> Thank you in advance
>