Focal Point Banner


As of December 1, 2020, Focal Point is retired and repurposed as a reference repository. We value the wealth of knowledge that's been shared here over the years. You'll continue to have access to this treasure trove of knowledge, for search purposes only.

Join the TIBCO Community
TIBCO Community is a collaborative space for users to share knowledge and support one another in making the best use of TIBCO products and services. There are several TIBCO WebFOCUS resources in the community.

  • From the Home page, select Predict: WebFOCUS to view articles, questions, and trending articles.
  • Select Products from the top navigation bar, scroll, and then select the TIBCO WebFOCUS product page to view product overview, articles, and discussions.
  • Request access to the private WebFOCUS User Group (login required) to network with fellow members.

Former myibi community members should have received an email on 8/3/22 to activate their user accounts to join the community. Check your Spam folder for the email. Please get in touch with us at community@tibco.com for further assistance. Reference the community FAQ to learn more about the community.


Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    [SOLVED] Excel 2010 Preparser

Read-Only Read-Only Topic
Go
Search
Notify
Tools
[SOLVED] Excel 2010 Preparser
 Login/Join
 
Member
posted
Does iWay have a CSV Preparser. I have a requirement wherein i need to edit my csv file to remove first 3 rows and last 4 rows. I tried to pass this through my transformer but since the number of columns are not equal in all rows it fails to convert it completely.

I tried the preparser but it only accepts .xls files and doesnt accept files which have been renamed from .csv to .xls

What do i do here. Please help

This message has been edited. Last edited by: <Kathryn Henning>,


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 7 | Registered: December 11, 2013Report This Post
Silver Member
posted Hide Post
Ravi,

Can you explain this in detail?

quote:
but since the number of columns are not equal in all rows


-
Srii
 
Posts: 38 | Registered: April 13, 2012Report This Post
Member
posted Hide Post
Srii,

I have a csv file wherein i need to remove the 1st 3 and the last few rows. The method in which i am trying to remove these is by converting the csv file to an xml format and then removing the rows based on the row number and values. For this, i tried passing through the transformer but it doesn't work as the number of columns for all the rows is not consistent. Hence it fails in the transformer.

I can't use the excel preparser too as it expects an xls file and renaming the .csv to .xls doesn't help either as it fails. Also tried renaming the .csv to .zip and tried using the unzip option in the listener. The content returned by the same is not of xml format.

Please let me know how can i proceed here.


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 7 | Registered: December 11, 2013Report This Post
Silver Member
posted Hide Post
Ravi,

Without diving deeper into the problem, a quick solution, in a non-standard way, I can think of, are the following for you:

1) Use XDConstantAgent with the following iFL:
quote:
 _concat('<root><lineItem>',_regex(_concat('<field>', _regex(_flatof(), "\n", "</field><field>"), '</field>'), ",", "</lineItem><lineItem>"), '</lineItem></root>') 
Mark the output payload as XML in the agent. Use this as an input to your transformation.

2) If the CSV payload being handled here is not too big, you can alternatively, use XDIterLine, to loop over every row and ignroe whichever you think is not needed.

Let me know, if that helps.

PS: Can you close threads you've opened here, if the issue is resolved, along with your closure description? This way anyone else reading it through in future may find it useful.

-
Srii

This message has been edited. Last edited by: Srii,
 
Posts: 38 | Registered: April 13, 2012Report This Post
Member
posted Hide Post
Hi Ravikiran_Magadi,

Even the number of columns not consistent in rows, Whether the empty columns separated by continues commas or not? If the empty columns separated by continues commas then the transformer works fine.


iWay Service Manager,
Windows.
 
Posts: 2 | Registered: March 28, 2013Report This Post
Member
posted Hide Post
All,

The problem is solved now. I adopted the XDIterline approach through which i was able to include and exclude the rows easily thus achieving successful transformation of the csv file into the required format.

Made use of the SREG(count) which is set automatically by XDIterline Agent. Through this we can track the number of rows in the csv file.

@Venkat,
Since this is a file provided by the customer i cannot modify the file by adding commas.


WebFOCUS 7.6
Windows, All Outputs
 
Posts: 7 | Registered: December 11, 2013Report This Post
  Powered by Social Strata  

Read-Only Read-Only Topic

Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    [SOLVED] Excel 2010 Preparser

Copyright © 1996-2020 Information Builders