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 Index » WebSphere Message Broker (ACE) Support » Need toConvert XLS(excel file) to XML

Post new topic  Reply to topic
 Need toConvert XLS(excel file) to XML « View previous topic :: View next topic » 
Author Message
w
PostPosted: Mon Nov 08, 2010 9:39 pm    Post subject: Need toConvert XLS(excel file) to XML Reply with quote

Apprentice

Joined: 08 Nov 2010
Posts: 44

I have to convert .xls to xml using WMB 6.1. Can any one tell me how to parse excel file using WMB.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Mon Nov 08, 2010 10:33 pm    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Have you looked at the actual on disk data structure of the .xls file?
A simple text editor does the job very well.

My guess is that if you do that you may well see what sort of 'pattern' the data is in.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
w
PostPosted: Mon Nov 08, 2010 10:40 pm    Post subject: Reply with quote

Apprentice

Joined: 08 Nov 2010
Posts: 44

The structure of the data in xls file is something like this

FirstName LastName Address
xx yyy zzzzz
aa bb ccc

when opened in a text editor there is no pattern to be found.
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Nov 09, 2010 1:06 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Any reason why the .xls cannot be exported as CSV, which broker can parse very easily? Probably a lot easier and safer than trying to parse a proprietary file format which could easily change.

Failing that, there must be Java libraries out there which can do the job.
Back to top
View user's profile Send private message
w
PostPosted: Tue Nov 09, 2010 1:14 am    Post subject: Reply with quote

Apprentice

Joined: 08 Nov 2010
Posts: 44

Well,the file that is coming is .xls only and is being put there by another system . So it cannot be made into CSV .And yes there are java API s availiable . Since i have to develop it using WMB 6.1 i was thinking if it could be done without using java.
Back to top
View user's profile Send private message
kimbert
PostPosted: Tue Nov 09, 2010 1:55 am    Post subject: Reply with quote

Jedi Council

Joined: 29 Jul 2003
Posts: 5542
Location: Southampton

Well, if you want to create a message set that can parse any .xls file, you need to read this : http://msdn.microsoft.com/en-us/library/cc313154%28v=office.12%29.aspx

Alternativelty, you could talk to the people who maintain the sending application and ask them whether they can *guarantee* to only use a subset of the .xls file format. Then you can relate that information to the specification and design a simpler message set.

In practice, I don't think you should do either of those things. The practical options are:
a) ask the sender to export the spreadsheet as csv. But I think you said that this is not an option.
- use a some Java ( in a WMB JavaCompute node ) to parse the .xls into a message tree

See this thread from 2007: http://www.mqseries.net/phpBB2/viewtopic.php?p=176499&sid=09a02666bcb00fca4b96d282519b0910

There is a good reason why very few WMB users want to do this - it is not a good idea to build proprietary file formats into your business integration strategy.
Back to top
View user's profile Send private message
w
PostPosted: Tue Nov 09, 2010 2:39 am    Post subject: Reply with quote

Apprentice

Joined: 08 Nov 2010
Posts: 44

@kimbert Thank you . It seems that the best way out is to use java APIs.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Need toConvert XLS(excel file) to XML
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.