[SOLVED] "Export to spreadsheet" function

Share your SQL query ideas for reporting in the WAPT Enterprise console here
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Locked
vincent.moisan
Messages: 20
Registration: January 24, 2023 - 11:44

October 4, 2024 - 8:36 AM

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
Attachments
Capture.PNG
Capture.PNG (50.32 KB) Viewed 25902 times
User avatar
dcardon
WAPT Expert
Messages: 1929
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

October 4, 2024 - 10:34

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
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
vincent.moisan
Messages: 20
Registration: January 24, 2023 - 11:44

October 4, 2024 - 3:38 PM

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'
User avatar
dcardon
WAPT Expert
Messages: 1929
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

October 7, 2024 - 11:30

Hello Vincent,

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

Regards,

Denis
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
vincent.moisan
Messages: 20
Registration: January 24, 2023 - 11:44

October 7, 2024 - 4:28 PM

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.
User avatar
dcardon
WAPT Expert
Messages: 1929
Registration: June 18, 2014 - 09:58
Location: Saint Sébastien sur Loire
Contact :

October 7, 2024 - 6:59 PM

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
Denis Cardon - Tranquil IT
Share your experiences on WAPT! Send us your blog and article URLs in the "Your Opinion of the forum, and we'll feature them on the WAPT
Locked