This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

xslxwriter on LM
#1
Hello,

is it possibility to integrate this function on LM Lua?

https://luarocks.org/modules/jmcnamara/xlsxwriter
Reply
#2
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?
Reply
#3
(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.
Reply
#4
If you want to test, I can prepare packages by the end of this week. For which LM do you want these packages?
Reply
#5
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.
Reply
#6
LM packages:
https://dl.openrb.com/lm-16.09/pkg/luazlib_0.5_mxs.ipk
https://dl.openrb.com/lm-16.09/pkg/luast....4_mxs.ipk
https://dl.openrb.com/lm-16.09/pkg/luazi....5_mxs.ipk
https://dl.openrb.com/lm-16.09/pkg/luaxl....6_mxs.ipk

LB packages:
https://dl.openrb.com/lm-16.09/pkg-lb/lu....5_x86.ipk
https://dl.openrb.com/lm-16.09/pkg-lb/lu....4_x86.ipk
https://dl.openrb.com/lm-16.09/pkg-lb/lu....5_x86.ipk
https://dl.openrb.com/lm-16.09/pkg-lb/lu....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()
Reply
#7
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.
Reply
#8
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
Reply
#9
Packages:
https://dl.openrb.com/lm-21-imx6/pkg/lua...4_imx6.ipk
https://dl.openrb.com/lm-21-imx6/pkg/lua...5_imx6.ipk
https://dl.openrb.com/lm-21-imx6/pkg/lua...5_imx6.ipk
https://dl.openrb.com/lm-21-imx6/pkg/lua...6_imx6.ipk
Reply
#10
What is the hardware model? You can check it in System config > System > Upgrade firmware.
Reply
#11
(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
Reply
#12
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!!
Reply
#13
You can find packages here: https://dl.openrb.com/lm-24-imx6/pkg/
Reply
#14
(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!!
Reply


Forum Jump: