Libxlsxwriter for Clarion

Yes, droplists would be needed for us. We use the “Libslsxwriter for Clarion” to create data entry templates. We like the formatting flexibility and speed a lot. Thanks for this great tool!

I just looked at the lib functions but I don’t know how to create valid Clarion functions (prototypes?) for those. I hope the future support in the wrapper for droplists is soon :wink:

I have written a wrapper and template set for LibXlsxWriter. And I have support for lists and data validation. Almost all of the functionality of the library is there. Some esoteric charting methods have not been wrapped. I am working on wrapping all of them.

The current version of the class/templates supports version 0.8.7 of the library.

Link is https://ikonyk.ca/clarion

Paul

1 Like

Hola me envias la pass

Updated to 1.2
Data validation, VBA, some fixes

Hi Rafael,

Thanks for continuing the support !

I get an error ‘Can t find entry point procedure workbook_add_vba_project in dll file’ while runing the exe.

Has this something to do with the excel language setting?

This error says what you didn’t replace libxlsxw.dll to newer version from zip/Bin and your exe works with an older version of it

New libxlsxw.dll worked :ok_hand:

Updated to 1.3
Cell comments, other additions

3 Likes

Hi,
Can I use this to read Excel files?
Get the values from it and populate my TPS files?

Regards

Johan de Klerk

No. Libxlsxwriter is designed only as a file writer . It cannot read or modify an existing Excel file. (c)

Hi Rafael,

I upgraded my server and did not want to install Microsoft Office just to create the XLSX files.

Used your system and man it is very-very fast, thank you very much.
Was also very easy to implement.

Question if at all possible.
Maybe I am just missing it.
Can you add two extra functions similar to WriteDateTime;

  1. WriteDate
  2. WriteTime
    If possible I would also like to specify the picture;
  3. WriteDate(7,1,TODAY(),@D6)
  4. WriteTime(7,1,CLOCK(),@T4)

Regards
Johan de Klerk

To write only the date or only the time, just send 0 for unusable vars, nothing else. I can add two functions that will do the same, but I don’t think this is really needed. Excel can’t store date or time separately
https://libxlsxwriter.github.io/working_with_dates.html

As for specifying pictures, there is two ways. First, you can use TPicture library (Taboga software), it converts Clarion pictures to Excel pictures on the fly. I don’t plan to rewrite this library. Second way, you can specify original Excel picture for the date or time:

xlsx.ClearFormat()
xlsx.Format.ExcelMask=‘dd-mm-yyyy’ !@D6-
xlsx.SetFormat()
xlsx.WriteDateTime(7,1,today(),0)

xlsx.Format.ExcelMask=‘hh:mm:ss’ !@T4
xlsx.SetFormat()
xlsx.WriteDateTime(7,1,0,clock())

Thank you very much.

hi to test this out do we have to download the c source and compile it here?

https://libxlsxwriter.github.io/index.html

You have to download only the zip from Sourceforge (see link in 1st post), that’s all

:eyeglasses: thanks! look very good… anything out there for MSWORD? the engineer is the software company i invested in wants to know.

I have a class that generates RTF. As for docx, I don’t know any libs, that can generate it

I have tried the Demo and it worked fine and I want to try it in my app. But if I copy the source into my app I get

Exception occurred at address 010231D1
Exception code C0000005: Access Violation
Process PID=872 Image: D:\Utvikling\Clarion11\Apps\Winkalk\WINKALK.exe
Thread 2 Handle=00000490 TID=10412

Exception parameters:
00000000
00000070

EAX=00000000 EBX=00000001 ECX=01140A24 EDX=02DA4B00
ESI=10012090 EDI=066EFA3B EBP=066EFBC8 ESP=066EF9D8
EIP=010231D1 FLG=00010246

It is when it executes “xlsx &=NEW(xlsxwriter)”

Anyone has any suggestion?

Trond

Make sure all the APPs in your solution are recompiled.

Thanks

They all are…