Convert .csv to .xls using powershell
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-04-2016 04:39 AM
Hi All,
I want to convert .csv file attached to a record in a table to .xls in Servicenow. Is there any script to convert this in the powershell activity?
I will be really greatful if any one can help me.
Thanks and regards,
Swamy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-04-2016 05:50 AM
This is more of a Powershell question than a ServiceNow question. Searching Google results in the following possibility:
How to export a CSV to Excel using Powershell - Stack Overflow
I hope this helps!
Ken
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-04-2016 06:01 AM
Hi Appell,
Thanks for your reply.
But, how can i specify a path for the attachment in Powershell script when the attachment was added to a record in the table created in Servicenow instance.
Regards,
Swamy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-04-2016 06:08 AM
You're best bet is to create a workflow that moves the attachment along to the script. See the following post for dealing with attachments in workflows:
Adding attachments to a workflow notifcation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-04-2016 06:17 AM
Hi Amaradi,
Create a datasource of file type csv.Attach file to datasource. Insert data to a table and get xls using url.. <instance_url>.<table_name>_list.do?EXCEL