Page 1 of 1

[SOLVED] "Export to spreadsheet" function

Published: October 4, 2024 - 8:36 AM
by Vincent Moisan
Good morning,

In many reporting queries, if a field is empty for certain machines, the export to the spreadsheet produces a non-compliant CSV file. This means that instead of providing a CSV file with empty fields where they exist, the file deletes these fields and shifts all the columns to the left. As a result, the results cannot be used correctly.

example csv text format.
Export Result:

Code: Select all

model;"serialnr";"mac";"computer_name";"ipaddress";"computer_fqdn";"os_name";"os_version";"type";"description";
HP HP ProDesk 405 G4 Desktop Mini;"8CC0AAAAAA";"aa:bb:cc:dd:ee:06";"PC82";"192.168.1.82";"PC82.domain.fr";"Windows 10 Pro";"10.0.19044";"Desktop";"INFO 4"
HP HP ProDesk 405 G4 Desktop Mini;"8CC0AAAAAB";"aa:bb:cc:dd:ee:50";"PC45";"192.168.1.45";"PC45.domain.fr";"Windows 10 Pro";"10.0.19044";"Desktop";"INFO16"
HP HP ProDesk 405 G4 Desktop Mini;"8CC0AAAAAC";"aa:bb:cc:dd:ee:3f";"PC97";"192.168.1.97";"PC97.domain.fr";"Windows 10 Pro";"10.0.19045";"Desktop";"INFO 9"
HP HP ProDesk 405 G4 Desktop Mini;"aa:bb:cc:dd:ee:ad";"PC71";"192.168.1.71";"PC71.domain.fr";"Windows 10 Pro";"10.0.19045"
HP HP ProDesk 405 G4 Desktop Mini;"8CC0AAAAAE";"aa:bb:cc:dd:ee:c2";"PC51";"192.168.1.51";"PC51.domain.fr";"Windows 10 Pro";"10.0.19044";"Desktop"
HP HP ProDesk 405 G4 Desktop Mini;"aa:bb:cc:dd:ee:19";"PC101";"192.168.1.101";"PC101.domain.fr";"Windows 10 Pro";"10.0.19045"
Expected Result:

Code: Select all

model;"serialnr";"mac";"computer_name";"ipaddress";"computer_fqdn";"os_name";"os_version";"type";"description";
HP HP ProDesk 405 G4 Desktop Mini;"8CC0AAAAAA";"aa:bb:cc:dd:ee:06";"PC82";"192.168.1.82";"PC82.domain.fr";"Windows 10 Pro";"10.0.19044";"Desktop";"INFO 4"
HP HP ProDesk 405 G4 Desktop Mini;"8CC0AAAAAB";"aa:bb:cc:dd:ee:50";"PC45";"192.168.1.45";"PC45.domain.fr";"Windows 10 Pro";"10.0.19044";"Desktop";"INFO16"
HP HP ProDesk 405 G4 Desktop Mini;"8CC0AAAAAC";"aa:bb:cc:dd:ee:3f";"PC97";"192.168.1.97";"PC97.domain.fr";"Windows 10 Pro";"10.0.19045";"Desktop";"INFO 9"
HP HP ProDesk 405 G4 Desktop Mini;;"aa:bb:cc:dd:ee:ad";"PC71";"192.168.1.71";"PC71.domain.fr";"Windows 10 Pro";"10.0.19045";;;
HP HP ProDesk 405 G4 Desktop Mini;"8CC0AAAAAE";"aa:bb:cc:dd:ee:c2";"PC51";"192.168.1.51";"PC51.domain.fr";"Windows 10 Pro";"10.0.19044";"Desktop";;
HP HP ProDesk 405 G4 Desktop Mini;;"aa:bb:cc:dd:ee:19";"PC101";"192.168.1.101";"PC101.domain.fr";"Windows 10 Pro";"10.0.19045";;;
Are you aware of this "bug"?

Sincerely

Re: "Export to spreadsheet" function

Published: October 4, 2024 - 10:34 AM
by dcardon
Hi Vincent,

This was patched in the penultimate version [1] :-) : "[FIX] waptconsole: fix export to CSV / XLS of NULL or empty cells"

Regards,

Denis

[1] https://www.wapt.fr/en/doc/wapt-changel ... 2024-07-18

Re: "Export to spreadsheet" function

Published: October 4, 2024 - 3:38 PM
by Vincent Moisan
Thanks for the reply.
I tried an upgrade.
OS: Debian 12 - old version: 2.5.4.15342 - new version: 2.5.5.15697.

When I run postconf.sh, here's the error message:

Unsupported on Windows. Run winsetup.py instead.
Traceback (most recent call last):
File "/opt/wapt/waptserver/scripts/postconf.py", line 36, in
from waptserver.scripts import nginxparser
ModuleNotFoundError: No module named 'waptserver'

Re: "Export to spreadsheet" function

Published: October 7, 2024 - 11:30 AM
by dcardon
Hello Vincent,

could you have installed the agent's .deb package instead of the server's?

Regards,

Denis

Re: "Export to spreadsheet" function

Published: October 7, 2024 - 4:28 PM
by Vincent Moisan
Hello,

No, the packages installed were: tis-waptserver and tis-waptsetup, according to the documentation available at this URL: https://www.wapt.fr/fr/doc/wapt-server-upgrade.html.

I ended up deleting everything and restoring a backup. Everything is working now. Thank you for your support.

Best regards.

Re: "Export to spreadsheet" function

Published: October 7, 2024 - 6:59 PM
by dcardon
Hi Vincent,
thanks for the feedback :-) . The error message implied that some Python files were missing from the server-side component. But anyway, if the upgrade went smoothly in the end, that's the most important thing.
I'm marking the topic as resolved.
Best regards,
Denis