Forum

Import Export of da...
 
Notifications
Clear all

Import Export of data from Text file removing Double Quotes

4 Posts
2 Users
0 Reactions
142 Views
(@a-maurizio)
Posts: 214
Reputable Member
Topic starter
 

Hello everyone, my name is Maurizio and my problem is this:
On an Excel sheet I inserted two keys that have a function inside it written in VBA for:
1) Create a TXT File and transport the Data from Del Foglio on it.

2) On the contrary, the second key should retrieve the data from the TXT file and rewrite it on the Excel sheet; So far so good.

Except for a fact that I would like to avoid: That when I recover the data from the TXT file and I report it on the Excel sheet, I see the double quotes ("")

So I wish they were not there; How can I avoid this?
Where did I go wrong ?

This is the link to download my workbook:
https://app.box.com/s/56sx4f47rsbnxo9sig8cha1nnc6lxlj6

Thanks, Greetings Sinceri from A.Maurizio

 
Posted : 19/12/2018 10:32 am
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

Hi Maurizio,

You need to change this line

RigaF = Split(Replace(lineafile, Chr(34), ""), ",")

Your text file has each line wrapped in double quotes = Chr(34) , the Replace function removes these. 

I've also modified the Split function so that it splits on the , rather than *,*

Read more on VBA String Functions

Regards

Phil

 
Posted : 20/12/2018 9:13 pm
(@a-maurizio)
Posts: 214
Reputable Member
Topic starter
 

Hi Philip Treacy Thanks for the tip and true !!!!!
As without doing it on purpose I had not noticed that mistake, and to think that in another file I had done a long time ago; he worked very well.
Here is the reason for my question.
Anyway Thanks Infinite.
I take this opportunity to make you and to all your staff of this wonderful community: my most sincere wishes for good holidays Hoping that 2019 will bring you so much luck to you and your family.
Sincere Greetings from A.Maurizio

 
Posted : 22/12/2018 12:07 pm
Philip Treacy
(@philipt)
Posts: 1629
Member Admin
 

You're welcome.

Merry Christmas and see you in 2019.

Phil

 
Posted : 22/12/2018 6:47 pm
Share: