ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum IndexWebSphere Message Broker SupportConversion of csv to xslx using esql compute node

Post new topicReply to topic
Conversion of csv to xslx using esql compute node View previous topic :: View next topic
Author Message
dileep1985
PostPosted: Tue Apr 10, 2018 9:25 am Post subject: Conversion of csv to xslx using esql compute node Reply with quote

Novice

Joined: 15 Jul 2017
Posts: 14

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
View user's profile Send private message
Vitor
PostPosted: Tue Apr 10, 2018 9:33 am Post subject: Re: Conversion of csv to xslx using esql compute node Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 25366
Location: Ohio, 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
View user's profile Send private message
dileep1985
PostPosted: Tue Apr 10, 2018 10:15 am Post subject: Re: Conversion of csv to xslx using esql compute node Reply with quote

Novice

Joined: 15 Jul 2017
Posts: 14

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
View user's profile Send private message
Vitor
PostPosted: Tue Apr 10, 2018 10:39 am Post subject: Re: Conversion of csv to xslx using esql compute node Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 25366
Location: Ohio, 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
View user's profile Send private message
timber
PostPosted: Wed Apr 11, 2018 2:58 am Post subject: Reply with quote

Sentinel

Joined: 25 Aug 2015
Posts: 892

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
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker SupportConversion of csv to xslx using esql compute node
Jump to:



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
Protected by Anti-Spam ACP


Theme by Dustin Baccetti
Powered by phpBB 2001, 2002 phpBB Group

Copyright MQSeries.net. All rights reserved.