Create Excel File

I need to create an excel file directly, prehaps from Queue or XML structure.

For various project specific reasons use of Capesoft Office Inside is not an option.

All comments welcomed. Thanks.

In Clarion 6.

When reading on this i uncovered Clarion Report Writer which claims to have excel abilities. Can anyone comment on this solution and how i would go about calling it from Clarion executable. See http://www.softvelocity.com/reporting/reportwriter.htm

Thanks.

Richard Bryce

1 Like

Richard,

Check out LibXL. This is a library that allows you to create excel files without excel being installed on the system.
http://www.libxl.com/home.html
There is a Clarion wrapper and class available from KlariSoft. http://www.klarisoft.com/KSNews_191.htm

Works well. It especially nice in a server environment where you don’t want to install Office on a server.

Rick

2 Likes

Hi Richard,

Long time no speak! Hope you’re well.

I’ve found for creating csv’s (if that works for you being an excel file), that StringTheory is pretty quick and painless.

You can create the rows, join with commas if necessary (or just use the .AddLine() st function on a string with commas, ie a row already built), join with <13,10>'s, and then save it as a filename with type .csv.

Works a treat. But that’s if csv works for you.

Stu

several methods Clarion programmers can use to extend ReportWriter’s capabilities, including how to incorporate ReportWriter’s print engine into an application and techniques to add external libraries to ReportWriter.

Refer to the help and LRM for examples of calling the Report Writer from within and application

Hi Stu,
i do this extensively already, the system i use has an inbuilt string class.

This requirement needs an excel file generated directly.

Thanks, Richard Bryce

Hi Richard,

Okay. So probably for slow folk as myself, give us a bit more detail. As far as most people are concerned, CSV is an excel file, and works “as” excel.

If you mean an xls or xlsx file, then cool. Don’t have any helpful thoughts on that.

Stu

1 Like

Note: .XLSX are just .ZIPs of folders of XML documents

exercise, take a .XLSX say yada.xlsx and rename it to yada.xlsx.zip
then navigate into the .zip using windows explorer

You can use the OpenXML Tool to reflect a document which generates all of the .NET code to create the document.
https://www.microsoft.com/en-us/download/details.aspx?id=5124

4 Likes

Excel and Word libraries are included in the CHT (Clarion Handy Tools) toolkit

Didier Le Duc

1 Like

Thanks MG! Nice one, good to know.

http://www.tabogasoftware.com/taboga_report_s_data_exporter_library.htm
Works perfect (i found some errors in source code, and fixed it)

RaFaEL,

You might know, FominTools has taken over Taboga Software accessory products. Could you please email me the details about “some errors” and the fix. I’d like to review it and include for upcoming release of Taboga Report Data Exporter. So, other customers will benefit from your fixes.

Regarding the current “Create Excel File” topic, Taboga Report Data Exporter can create Excel spreadsheet (XLS) file and fill it with data extracted from standard Clarion report. It can work side-by-side with SoftVelocity’s PDF, HTML, TEXT, XML report output generators and uses the same WMF parser technology and interface.

Taboga Report Data Exporter requires and uses Taboga Native Excel library. It is pure Clarion source code library allowing to create and write BIFF8 (Excel 2003) XLS file directly. The library is very fast and efficient. No need for slow OLE automation. No need to have Excel installed. Suitable for ABC, Legacy and hand coded projects.

Demo program(s) available at http://fomintools.com/taboga/TabogaDemo.zip

Both Taboga Report Data Exporter and Taboga Native Excel library are available from ClarionShop.

Best regards,

support (at) fomintools.com
http://www.FominTools.com

RaFaEL,

Thank you very much for the information being sent to me directly. All your fixes where tested and approved. Besides, my own fixes where added to source code of Taboga Native Excel library.

Change log:
CHANGE: New installation file compatible with the latest Clarion versions.
FIX: Merged Cells range was written to BIFF file incorrectly.
FIX: Accurate/precise column width setting is now possible.
FIX: Custom colors can now be used.
FIX: Left and Right cell border colors can now be set correctly.

New product version (v.2016.10.28) has been released.
Demo program at http://fomintools.com/taboga/TabogaDemo.zip has been updated.

Thank you,

support (at) fomintools.com
http://www.FominTools.com

Hi Richard

if csv is no good, perhaps check out the xCell Class within Capesoft’s xFiles.

http://www.capesoft.com/docs/xFiles/xfiles.htm#xCellClass

not sure if that would fit the bill or still be inadequate for what you are after??

Like Stu I also use StringTheory to create csv files, but generally I just use .Append() rather than using the lines Q and then joining them. Same result though.

cheers

Geoff R

1 Like

Hi Richard,

EasyExcel is best solution for me.
http://www.ingasoftplus.com/ProductDetail.php?ProductID=16

1 Like

Hi Richard,

If formating (style, color and so on) XL cells is not mandatory, you can just use the ODBC driver.

I’ve made a quick and dirty sample prj, but uploading here is not allowed to this newbie (eg: me) :slight_smile:

Regards.

LibXL, works fine and faster.

:slight_smile: the thing is that when you have the Handy Tools it is build in, like hundreth of other libraries.