Collection manipulation - Change Column DataType

Ismael

New Member
Hi all,

I am facing the following issue with BP 6.4.0.

  1. When getting CSV file to collection I get some columns formatted as "Number".
  2. I made the following simple custom code, to translate all the columns to String (Text).

---------

Code:
OutCol = inCol.Clone()

'convert all the columns type to String
For Each col As DataColumn In OutCol.Columns
  col.DataType = GetType(String)
Next

OutCol.Load(inCol.CreateDataReader)

---------

Now the issue comes that when using BP 5.0.12 it works perfectly and I get all the columns as "Text" (originally were "Number").
However with BP 6.4.0, I still get some columns as "Number". (couple of screenshots attached of BP 5 correct cast)

Any idea why and how to overcome this issue?

Thanks a lot for your help!

Cheers,
Ismael.
 

Attachments

  • screen1.PNG
    7 KB · Views: 40
  • screen2.PNG
    3 KB · Views: 32

yogesh sopp

New Member
You can keep column type as general as shown below image 1620611902387.png

And Use Get Worksheet As Collection (Fast) Action of MS Excel VBO

1620612010267.png

You will get all column type as text only.

1620612095884.png
 
Last edited:
Top