Reading and processing CSV Files

This issue has been solved. See solution.
BenBrazil's picture

Hello,

I am trying to read a CSV file and then display the contents of the CSV file in a Webform. I have followed the advice given in this post:

https://www-secure.symantec.com/connect/forums/par...

I have created my own integration library using the CSV file I want to process. I have followed the rest of the instructions, putting the components into the project.

When I run the project I get the following error:

Error Message:
Object reference not set to an instance of an object.

I am not sure where I have gone wrong. I have attached the project to this post.
Would someone be able to tell me what I need to do in order to process the CSV file please?

Many thanks,

Ben.

reecardo's picture

Whick comp in your flow does

Whick comp in your flow does it throw this exception? The read file/the int library? If you could attach the CSV file you're attempting to use, I could track this down...

BenBrazil's picture

Hi Reecardo, thanks very much

Hi Reecardo,

thanks very much for you response.
I think it is catching the error in the Dynamic Class Read.
Here is the full error:

Error Details
Error Message:
Object reference not set to an instance of an object.

Message Stack:
at Generated.CSV.DynamicClassRead.Run(IData data)
at LogicBase.Core.ExecutionEngine.MultiPathProcessComponentExecutionDelegate.Execute(IData data, IOrchestrationComponent comp, String& outputPath, IExecutionEngine engine, TLExecutionContext context)
at LogicBase.Core.ExecutionEngine.AbstractExecutionEngine.DoRunComp(IOrchestrationComponent comp, IData data, TLExecutionContext context)

This is the CSV I am trying to process:

Name,FreeSpaceMB
ESX_Shared_9,44747
ESX_Shared_1,33231
datastore1,64463
ESX_Shared_5,43441
"datastore1 (1)",64463
ESX_Shared_6,39875
ESX_Shared_2,31151
ESX_Shared_3,473

Thanks again,
Ben

reecardo's picture

Good news... I was able to

Solution

Good news... I was able to get your project to run properly when I unchecked "First Row is Field Names". The problem is... the first row of your CSV file ARE field names. I'm unsure why the behavior is reversed here. But anyways, uncheck the first row checkbox and you should be in good shape.

BenBrazil's picture

Hi Reecardo, Many thanks for

Hi Reecardo,

Many thanks for your help.

I dont think I would have found that myself.

Regards,

Ben.