Logic Machine Forum
xslxwriter on LM - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: xslxwriter on LM (/showthread.php?tid=472)



xslxwriter on LM - buuuudzik - 25.11.2016

Hello,

is it possibility to integrate this function on LM Lua?

https://luarocks.org/modules/jmcnamara/xlsxwriter


RE: xslxwriter on LM - admin - 28.11.2016

Possible, but it depends on several other packages which have to be adapted/compiled for LM. Do you really need XLSX support? There's a specific XML format that Excel understands which can have formulas and formatting. It's not very simple but can be generated without any additional libraries. What kind of data do you want to put in your report?


RE: xslxwriter on LM - buuuudzik - 28.11.2016

(28.11.2016, 13:55)admin Wrote: Possible, but it depends on several other packages which have to be adapted/compiled for LM. Do you really need XLSX support? There's a specific XML format that Excel understands which can have formulas and formatting. It's not very simple but can be generated without any additional libraries. What kind of data do you want to put in your report?

I've asked in the past about it and recently I've found this solution so I've asked if this is possible. This would be a good function for proffesional solutions like generating nice reports with a few ways of showing the data from e.g. hundred shops without any additional software only for this purpose(everybody has Excell or Libre Calc). Maybe this could be an older format not xlsx but xls.

At this moment this is not very important but from time to time there is such subject when LM couldn't be used because it has not prepared function for generating the reports and there are  solutions which has such function now so unfortunately they are used.


RE: xslxwriter on LM - admin - 29.11.2016

If you want to test, I can prepare packages by the end of this week. For which LM do you want these packages?


RE: xslxwriter on LM - buuuudzik - 29.11.2016

If this wouldn't be a problem please prepare this for the Load Balancer and LM4. I will check this function and prepare some script with report example. You can add this to the examples on the openrb.com if you want.


RE: xslxwriter on LM - admin - 30.11.2016

LM packages:
https://dl.openrb.com/lm-16.09/pkg/luazlib_0.5_mxs.ipk
https://dl.openrb.com/lm-16.09/pkg/luastruct_1.4_mxs.ipk
https://dl.openrb.com/lm-16.09/pkg/luazipwriter_0.1.5_mxs.ipk
https://dl.openrb.com/lm-16.09/pkg/luaxlsxwriter_0.0.6_mxs.ipk

LB packages:
https://dl.openrb.com/lm-16.09/pkg-lb/luazlib_0.5_x86.ipk
https://dl.openrb.com/lm-16.09/pkg-lb/luastruct_1.4_x86.ipk
https://dl.openrb.com/lm-16.09/pkg-lb/luazipwriter_0.1.5_x86.ipk
https://dl.openrb.com/lm-16.09/pkg-lb/luaxlsxwriter_0.0.6_x86.ipk

Demo code, will produce demo.xlsx in FTP root directory:
Code:
writer = require('xlsxwriter.workbook')

workbook  = writer:new('/home/ftp/demo.xlsx')
worksheet = workbook:add_worksheet()

worksheet:set_column('A:A', 20)

bold = workbook:add_format({bold = true})

worksheet:write('A1', 'Hello')

worksheet:write('A2', 'World', bold)

worksheet:write(2, 0, 123)
worksheet:write(3, 0, 123.456)

workbook:close()



RE: xslxwriter on LM - buuuudzik - 30.11.2016

Nice function but unfortunately it hasn't possibility to add some trend from tables. My badSmile

But anyway this is a nice function because there is a solution for preparing some formatted data which can be sent to the user e.g. monthly report.

Now I've found that such reports with some tables and other advanced objects can be prepared via Google Sheets API.


RE: xslxwriter on LM - ChristianZurfluh1 - 26.10.2021

Hello

I currently have a similar problem. The customer would like to receive the data from the trend recording as XLSX format by mail. The automatic mail with the data as CSV format works, but I cannot send the data as XLSX format.
Unfortunately, the links above no longer work....
I have a LogicMachine LM5Lp2 in use
Thanks for the support


RE: xslxwriter on LM - admin - 27.10.2021

Packages:
https://dl.openrb.com/lm-21-imx6/pkg/luastruct_1.4_imx6.ipk
https://dl.openrb.com/lm-21-imx6/pkg/luazlib_0.5_imx6.ipk
https://dl.openrb.com/lm-21-imx6/pkg/luazipwriter_0.1.5_imx6.ipk
https://dl.openrb.com/lm-21-imx6/pkg/luaxlsxwriter_0.0.6_imx6.ipk


RE: xslxwriter on LM - admin - 14.12.2021

What is the hardware model? You can check it in System config > System > Upgrade firmware.


RE: xslxwriter on LM - ChristianZurfluh1 - 14.12.2021

(14.12.2021, 16:23)admin Wrote: What is the hardware model? You can check it in System config > System > Upgrade firmware.

Hello admin

The Problem was, that i didnt had the newiest Firmware on the Logicmachine. 

Now everything worked fine.

Thanks for the quick answer Smile


RE: xslxwriter on LM - kike - 17.06.2024

Hello everyone!

I need to deal with XLS and XLSX files, that's whay I found this post. Is this feature already integrated in the new firmware or these files are still a "must have". In that case, the files are no longer in the server. It's still posible to do it?

thanks!!


RE: xslxwriter on LM - admin - 18.06.2024

You can find packages here: https://dl.openrb.com/lm-24-imx6/pkg/


RE: xslxwriter on LM - kike - 18.06.2024

(18.06.2024, 07:12)admin Wrote: You can find packages here: https://dl.openrb.com/lm-24-imx6/pkg/

thank you very much!! I did not see that package when checked, sorry!!