1. Creating an Excel file?
- Posted by Jeremy Cowgar Jul 03, 2008
- 812 views
Does anyone have code to create simple Excel files in Euphoria? I know you can write a CSV file and Excel will open the file, but I am hoping to provide a bit for formatting. I am not against using DDE type code if necessary, but was hoping to be able to use do something like:
integer fh = open("file.xls", "wb") addCell(fh, 1, 1, "Name", {"font=bold", "size=15"}) addCell(fh, 2, 1, "John", {}) addCell(fh, 2, 1, "Jane", {}) -- etc...
or something like that. May be asking too much.
Jeremy
2. Re: Creating an Excel file?
- Posted by Greg Haberek Jul 03, 2008
- 881 views
Does anyone have code to create simple Excel files in Euphoria? I know you can write a CSV file and Excel will open the file, but I am hoping to provide a bit for formatting. I am not against using DDE type code if necessary, but was hoping to be able to use do something like:
[snip]
or something like that. May be asking too much.
Jeremy
There is something in the Archive to do this. However, the Archive is not currently search able.
-Greg
3. Re: Creating an Excel file?
- Posted by Matt Lewis Jul 03, 2008
- 875 views
Does anyone have code to create simple Excel files in Euphoria? I know you can write a CSV file and Excel will open the file, but I am hoping to provide a bit for formatting. I am not against using DDE type code if necessary, but was hoping to be able to use do something like:
integer fh = open("file.xls", "wb") addCell(fh, 1, 1, "Name", {"font=bold", "size=15"}) addCell(fh, 2, 1, "John", {}) addCell(fh, 2, 1, "Jane", {}) -- etc...
or something like that. May be asking too much.
There is an Excel demo for eucom:
http://sourceforge.net/projects/eucom/
Matt
4. Re: Creating an Excel file?
- Posted by Jeremy Cowgar Jul 03, 2008
- 793 views
There is something in the Archive to do this. However, the Archive is not currently search able.
I thought I remembered searching for one before w/no luck, that's why I asked here. However, since you said there was, I browsed each category. I found it under Utilities. Thanks for the pointer. It's doing what I want, as of now. It only has add_label and add_number routines, but I can work with it.
Thanks for the tip!
Jeremy
5. Re: Creating an Excel file?
- Posted by Jeremy Cowgar Jul 03, 2008
- 798 views
There is an Excel demo for eucom:
Thanks for the pointer, but since I found straight Euphoria code that will do it, I am going to use that. It will mean we can generate Excel files from a web server too, which I would like to be able to do.
Jeremy
6. Re: Creating an Excel file?
- Posted by Michael Sabal Jul 03, 2008
- 786 views
Does anyone have code to create simple Excel files in Euphoria? I know you can write a CSV file and Excel will open the file, but I am hoping to provide a bit for formatting. I am not against using DDE type code if necessary, but was hoping to be able to use do something like:
integer fh = open("file.xls", "wb") addCell(fh, 1, 1, "Name", {"font=bold", "size=15"}) addCell(fh, 2, 1, "John", {}) addCell(fh, 2, 1, "Jane", {}) -- etc...
or something like that. May be asking too much.
Jeremy
Your best bet is to create an HTML table and save it with an XLS extension. MS Excel will be quite happy to read it completely formatted as if it were a BIFF8/OLE2 (Excel's native format) file. OpenOffice, however, will try to open the file with Writer instead of Calc. The demo in the archives uses BIFF2, which is a very old format that modern versions of Excel have trouble with. OpenOffice, however, reads it just fine.
Contrary to common sense, Microsoft Office files are really FAT file systems, with indexed tables and pointers all over the place. I have a very limited program to read BIFF8 files, but haven't been successful with writing them, and haven't tried too hard since the HTML option is so much easier.
7. Re: Creating an Excel file?
- Posted by CChris Jul 03, 2008
- 890 views
Does anyone have code to create simple Excel files in Euphoria? I know you can write a CSV file and Excel will open the file, but I am hoping to provide a bit for formatting. I am not against using DDE type code if necessary, but was hoping to be able to use do something like:
[snip]
or something like that. May be asking too much.
Jeremy
There is something in the Archive to do this. However, the Archive is not currently search able.
-Greg
EuCom comes with examples on interfacing with Excel. There is also a small file probably named excelwrite.zip (which I unearthed as Dd766.zip in my recycle bin). Emailing it now.
CChris