Thread Subject: xlswrite formating text and numbers

Subject: xlswrite formating text and numbers

From: Michael

Date: 23 Dec, 2008 18:15:05

Message: 1 of 3

Hello Everyone,

Here is my problem. I generate a matrix of (x,y,z) points. I want to dump these to a specified excel file and sheet, which has a macros built in. Before the data I need two rows of text and after the data I one row of text. I would also like to clear the contants of the xls file (not necessarily the formating).

How can I accomplish this using the xlswrite command?

--------Command used-------
xlswrite('GSD_PointSplineLoftFromExcel_matlab.xlsm', M, 'Feuil1')

-----------Format Needed------------
StartLoft
StartCurve
MyData (this is the x,y,z)data
EndCurve

Subject: xlswrite formating text and numbers

From: Walter Roberson

Date: 23 Dec, 2008 18:27:55

Message: 2 of 3

Michael wrote:

> Here is my problem. I generate a matrix of (x,y,z) points. I want to dump these to a
> specified excel file and sheet, which has a macros built in.

I deduce from that that you are using a "real" connection to Excel, not just using
"xlswrite" as another name for creating a csv (Comma Separated Value) file.

> Before the data I need two rows of text and after the data I one row of text.
> I would also like to clear the contants of the xls file (not necessarily the formating).

I do not know at the moment about clearing the contents of the xls file, but the other
part you would do by making multiple calls to xlswrite() specifying a different Range
each time -- e.g., you would write the first line of the title to A1:A1, the
second line to the next cell down, the matrix from the third to the N+2'th cell down
and 3 cells across, and so on.

--
.signature note: I am now avoiding replying to unclear or ambiguous postings.
Please review questions before posting them. Be specific. Use examples of what you mean,
of what you don't mean. Specify boundary conditions, and data classes and value
relationships -- what if we scrambled your data or used -Inf, NaN, or complex(rand,rand)?

Subject: xlswrite formating text and numbers

From: Andreas Sprenger

Date: 23 Dec, 2008 20:20:18

Message: 3 of 3

"Michael" <michael.lisowski@gentex.com.extrachar> wrote in message <gir9r9$dae$1@fred.mathworks.com>...
> Hello Everyone,
>
> Here is my problem. I generate a matrix of (x,y,z) points. I want to dump these to a specified excel file and sheet, which has a macros built in. Before the data I need two rows of text and after the data I one row of text. I would also like to clear the contants of the xls file (not necessarily the formating).
>
> How can I accomplish this using the xlswrite command?
>
> --------Command used-------
> xlswrite('GSD_PointSplineLoftFromExcel_matlab.xlsm', M, 'Feuil1')
>
> -----------Format Needed------------
> StartLoft
> StartCurve
> MyData (this is the x,y,z)data
> EndCurve
You should think about a macro in Excel that will be applied on your new xls file. I have extended the xlswrite command (see FEX) so that you can write multiple named sheets in one file. You may enhance your Excel macro checking sheet names and applying specific Excel formats.
Good luck

Andreas

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
excel Ned Gulley 23 Dec, 2008 14:53:12
rssFeed for this Thread

Contact us at files@mathworks.com