You can write code to read data from notepad file. Using the below suggestion, you can read the content of the notepad file on to Clipboard with out opening the file.
- Create a object and add a code stage that accepts 'Path' as input. ('Path' is the full path of the notepad file)
- Add code:
Clipboard.SetText(File.ReadAllText(Path));
- Publish the object
- Save
These references needs to be added under the 'Code Options' tab of Initialise page for successful processing.
- External References:
- Name Spaces:
- System.Windows.Forms
- System.IO
This action will copy the data to the clipboard. Now, you can write data from Clipboard in to a Data item using a Calc stage with expression 'GetClipboard()' . If you want to slice and dice the data in the Data Item, use related actions: Split lines, Split Text from String manipulations VBO.
On using these actions, the data will be written in to Collections. You can now write the data in collection to excel using 'Write Collection' action from MS Excel VBO.
Note: This line of code suggested works only for the notepad files.