|
RSS Feed - WebSphere MQ Support
|
RSS Feed - Message Broker Support
|
 |
|
Conversion of csv to xslx using esql compute node |
« View previous topic :: View next topic » |
Author |
Message
|
dileep1985 |
Posted: Tue Apr 10, 2018 9:25 am Post subject: Conversion of csv to xslx using esql compute node |
|
|
Novice
Joined: 15 Jul 2017 Posts: 15
|
Hi,
Could you help me to get the code to convert an csv file to xlsx.
Requirement: generated a file with csv , need to convert the same to xslx.
Can I do it thru esql, could you help me here.
I am looking a away out other than .net compute node. Becz .Net compute node is asking me to install visual studio for assembly creation
Done this
SET tmpFileName = fileName || '.xslx';
SET OutputLocalEnvironment.Destination.File.Name = tmpFileName;
But the file is not opening. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Apr 10, 2018 9:33 am Post subject: Re: Conversion of csv to xslx using esql compute node |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
dileep1985 wrote: |
Done this
SET tmpFileName = fileName || '.xslx';
SET OutputLocalEnvironment.Destination.File.Name = tmpFileName;
But the file is not opening. |
So you think that just by changing the file extension this automagically changes the file format? If you try this in Windows Explorer, you get a dialog box saying "changing the extension of a file may cause it to become unusable".
To demonstrate:
- Open a new worksheet in Excel
- Type something
- Save it
- Open it with Notepad, Notepad++, WordPad or similar text editor
- Note how the contents are a jumble of binary elements
An xslx file is a Microsoft binary format so you need to do conversion on the contents as well as just changing the extension. It's probable you can do this with ESQL if you can find the confidential and proprietary format descriptor Microsoft uses somewhere on the dark web. If not, there may be an .NET class you can use in a .NET node to do it (once you've installed Visual Studio)
Or you can not do it at all and open the CSV file directly in Excel, which would be my preference. _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
dileep1985 |
Posted: Tue Apr 10, 2018 10:15 am Post subject: Re: Conversion of csv to xslx using esql compute node |
|
|
Novice
Joined: 15 Jul 2017 Posts: 15
|
Thanks for the information.
I am facing some difficulty in using .net compute node, hence it requires visual studio to be installed . Also as per IBM,so there is a restriction here . Neverthless i am doing my research now, but please let me know if you have any further inputs
The .NETCompute node runs only on Windows brokers. An error occurs if you attempt to deploy a message flow that contains a .NETCompute node to a broker that is running on a non-Windows system. Ensure that the broker is running on Windows before you deploy your message flow. |
|
Back to top |
|
 |
Vitor |
Posted: Tue Apr 10, 2018 10:39 am Post subject: Re: Conversion of csv to xslx using esql compute node |
|
|
 Grand High Poobah
Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA
|
dileep1985 wrote: |
The .NETCompute node runs only on Windows brokers. An error occurs if you attempt to deploy a message flow that contains a .NETCompute node to a broker that is running on a non-Windows system. Ensure that the broker is running on Windows before you deploy your message flow. |
Well clearly using .NET on a non-Windows platform is a restriction, and not one IBM imposes; Microsoft does not support .NET on anything other than Windows.
(And before anyone says anything, I know it's possible to finagle .NET to run on Linux. I don't think anyone here should be using a finagle in Prod).
My input remains the same - why bother? What does an xslx file get you that a CSV doesn't? _________________ Honesty is the best policy.
Insanity is the best defence. |
|
Back to top |
|
 |
timber |
Posted: Wed Apr 11, 2018 2:58 am Post subject: |
|
|
 Grand Master
Joined: 25 Aug 2015 Posts: 1292
|
I agree with Vitor - this sounds like a spurious requirement to me. I would go back to the architect/designer and ask why they need an xslx file?
Excel automatically imports a .csv file and displays it like a normal spreadsheet - why is that not good enough? |
|
Back to top |
|
 |
|
|
 |
|
Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|
|
|