Input file either csv or xlsx
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi All,
We received input file either csv or xlsx file format so we have to process out workflow on both types. Headers also not given on both type input files so we need to extract entire data and adding header manually for both csv and xlsx format. I have attached my workflow and input and expected result. please do the needful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@Dhilip_Kumar Is the error calling out the file that the Dynamic Input is mapped to? Are the Dynamic Input tools mapped to existing files? The file that you map the Dynamic Input tool is not the file you're trying to open. It's just a placeholder that will be replaced by the incoming FullPath from the Directory tool.
 
This is what happens when I run the workflow and nothing is in the folder that the Directory tool is mapped to.
 
 
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@Prometheus I had only csv file as input file for this workflow that is why we got error on xlsx part i believe. If we put some dummy xlsx file in the folder then we do not get any error but if we put any dummy data headers are update twice since we use join tool to connect xlsx and csv. Please advise me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@Dhilip_Kumar By input, do you mean that you have only a CSV in the folder that the Directory tool is pulling in from? I was asking if your Dynamic Input tools are mapped to existing CSV and XLSX. One needs to be mapped to an existing CSV and the other needs to be mapped to an existing XLSX. Then if there's no CSV or there's no XLSX, there's also no error.
This is what it looks like when I have no CSV in the input folder:
This is what it looks like when I have no XLSX in the input folder:
No errors.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@Prometheus let me answer your question first,
By input, do you mean that you have only a CSV in the folder that the Directory tool is pulling in from? - Yes
I was asking if your Dynamic Input tools are mapped to existing CSV and XLSX. - Yes
So you said, if we mapped to existing CSV and XLSX it means we need to keep one CSV and XLSX file particular folder always?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@Prometheus I can see your above workflow but i got error while merging those two output into one result. So could you please advise how could get the result on your workflow. I need only one sheet as output either the input format is CSV or XLSX.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@Dhilip_Kumar I'll answer your question first. "So you said, if we mapped to existing CSV and XLSX it means we need to keep one CSV and XLSX file particular folder always?" No. The folder that the Directory tool is mapped to can be empty, like this:
The Dynamic Input tools have to be mapped to something that exists, like this:
 
I'm not actually pulling in data from either of these files. They're just serving as placeholders. The path to open them will be replaced by the FullPath from the incoming Directory tool.
 
 
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@Prometheus Could you please advise how to get output as single sheet for both xlsx and csv. That would be helpful to me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@Dhilip_Kumar Try this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@Prometheus I apologies for continuous questions. I tried this workflow got same error. I have attached my workflow and error message with configuration settings of input.
Please edit that workflow and help me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@Dhilip_Kumar From what I can see in your workflow, you haven't mapped the Dynamic Input tools to existing files.
Go to the Dynamic Input tool and click on "Edit."
 Then click on "Set up a connection"
Then select an XLSX file to connect to. You'll know you have a good connection when you see data in the bottom part of the above screenshot -- Preview (first 100 records). Make sure your Dynamic Input tool is going to read in the FullPath from the Directory tool by clicking on the radio button next to "Read a List of Data Sources." Select "FullPath" from the "Field:" dropdown menu, then select "Change Entire File Path" from the "Action:" dropdown menu.
When you run your workflow, the FullPath from the Directory tool will replace the path to the file you selected. You should not have errors.
 
 
