How to make XLSX File with Harbour
There are various ways to create xlsx files using tools like Harbour or Fivewin. However, some methods require the use of specific DLLs or ADO.
In my case, I prefer not to distribute many auxiliary files. Moreover, when using ADO, there are numerous unknown issues depending on the client environment. This can lead to unforeseen compatibility problems when dealing with a wide range of users.
How was the above issue resolved?
- I hardforked the source of libxlsxwriter.
- libxlsxwriter is under the FreeBSD license, allowing freedom to modify, adapt, and distribute without the need to disclose the modified source code.
- I adapted libxlsxwriter for both Harbour 32-bit and 64-bit environments and bound it as a library. ( DrXlsx32.lib and DrXlsx64.lib, no need libxlsxwriter.dll )
- I removed all external dependencies of libxlsxwriter and replaced them with substitute code, eliminating the need for any DLLs.I removed all external dependencies of libxlsxwriter and replaced them with substitute code, eliminating the need for any DLLs.
- To make it user-friendly, I created the TDrXlsx CLASS.
Hello world!
FUNCTION Main()
LOCAL oXlsx := TDrXlsx():New()
oXlsx:CreateFile("test.xlsx")
oXlsx:WriteString(0,0,"안녕하세요")
oXlsx:WriteString(1,0,"Hello World!")
oXlsx:Close()
RETURN NIL
by Charles KWON
Hey Kwon!
Was reading fw ngs … say this link to your site.
Just a note saying Hi – and hope all is well on your side of the globe.
Rene.