|
|
|
|
google site
|
|||||||
| Forums | Register | Blog | Man Pages | Forum Rules | Links | Albums | FAQ | Users | Calendar | Search | Today's Posts | Mark Forums Read |
| Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|||
|
creating more than 2 excel sheets in C
Hi,
I have a question about using C to write excel file. There is a way to write into a sheet into a file excel, like this: FILE * File; pMyFile = fopen("test.xls", "w+"); fprintf(File, "\n\n"); /* go to the row 2 of the column A*/ fprintf(File, "%s", "Hi pippo!"); /* write the string "Hi pippo"*/ The question is: Is there something like this that allow me to write in a second sheet, in the same xls file? Otherwise is there a package in C or something like that to manipulate excel file? Thank you |
| Sponsored Links |
|
|
|
|||
|
1. the code you show won't compile
2. fprintf(FIle,"\n\n") places two line feeds in the file, that does'nt mean it went to line #2 3. OpenOffice or old Star Office have routines that can manipluate .XLS files. See: www.openoffice.org |
|
|||
|
What you seem to be creating is called a comma-delimited (.csv) file. It can also be tab-delimited In order to have multiple worksheets or workbooks you need a format called BIFF - specifcally BIFF2 or BIFF4.
If you don't like my answer then goto www.wotsit.org -- and look up the file structure for xls files. Open the pdf file on the XP version. It is very large because the format of these files is not trivial. You will find a format called BIFF2 and BIFF4. The records you are writing are not in that format. These formats store separate worksheets/workbooks. And it makes no sense to create a file with worksheets unless it will be opened by OpenOffice or by Micrsoft Excel. There is nothing else I can contribute. |
|
|||
|
Sorry, but I don't know how to write the character CTRL-PAGEDOWN.
How can I do it? Thank you |
| Sponsored Links |
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Excel help | moe2266 | UNIX for Dummies Questions & Answers | 2 | 08-06-2007 01:20 PM |
| How to format excel sheets in UNIX?? | Vijay06 | Shell Programming and Scripting | 2 | 05-16-2007 10:01 AM |
| Creating Excel Sheet in Hp-UX | KVSPRASAD | HP-UX | 5 | 02-07-2007 11:16 PM |
| Multiple excel work sheets through UNIX | puspendu | Shell Programming and Scripting | 1 | 05-03-2006 05:28 AM |
| excel | swakoo | UNIX for Dummies Questions & Answers | 2 | 11-24-2004 01:25 AM |