For a project i would need to export data from an .xlsm file data to a CSV file and then process it with powershell. I do the export manually. In the original file, there are line breaks in the headers, which are also transferred to the CSV file. My questions:
- Can I export a specific sheet from an .xlsm with Powershell?
- How can I replace the line breaks with spaces?
Attached is an example of what the original .xlsm file looks like.
Update: Unfortunately, I do not know how to upload a file. Here is the content of an example CSV file:
Host name;Computer name old;IP-addr.;"IP-addr.
free?";"Subnetmask
CIDR Suffix";Static DNS entry;DNS alias;"vCPU Number
[Units]";"RAM
[GB]";"Boot disk
[GB]";;;;;;;;
Broadcast;;172.225.145.0;Net;26;;;;;;;;;;;;;
Gateway;;172.225.145.1;Net;26;;;;;;;;;;;;;
Server125;;172.225.145.2;yes;26;;;;;;;;;;;;;
Server126;;172.225.145.3;yes;26;;;;;;;;;;;;;
Server127;;172.225.145.4;yes;26;;;;;;;;;;;;;
Server128;;172.225.145.5;no;26;;;;;;;;;;;;;
Screenshot from Notepad++ of the CSV file