Hi, I am new to the group and new to coding in vba
I am trying to import 100+ .dat files with tilde delimiter having few empty columns. My query works fine if the cell has value. However if the cell is empty it ignores the cells, which changes the file layout.
If the column is empty then the cell should be blank instead of skipping the cell.
Here is my code:
Here is the sample data:Please Login or Register to view this content.
Column 7 and Column 11 are empty and I would like to import the column with null value
1012955820101~12121212121~ABCED GHIJKL MNOPQ RSTUVW XYZ~20201117~20210125~3.200~~3.200~2630.75~3303.80~~000003649462~/~1588765986~01~001~0000000000000~?~N~05340516880~0~0.00~0.00~?~0.00~28~1417205527~?~505~1~01
1050950936101~12121212121~ABCED GHIJKL MNOPQ RSTUVW XYZ~20201118~20210301~3.200~~3.200~2630.75~3303.80~~000003651745~/~1588765986~01~001~0000000000000~?~N~05358851520~0~0.00~0.00~?~0.00~28~1417205527~?~505~1~01
0363951048001~12121212121~ABCED GHIJKL MNOPQ RSTUVW XYZ~20201120~20210111~3.200~~3.200~2630.75~3303.80~~000003651998~/~1588765986~01~001~0000000000000~?~N~05355951440~0~0.00~0.00~?~0.00~28~1417148073~?~505~1~01
1008953335201~12121212121~ABCED GHIJKL MNOPQ RSTUVW XYZ~20201209~20210119~3.200~~3.200~2630.75~3441.03~~000003786038~/~1417969882~02~001~0000000000000~?~N~05356967340~0~0.00~0.00~?~0.00~21~1467074328~?~150~1~05
1034951077901~12121212121~ABCED GHIJKL MNOPQ RSTUVW XYZ~20201210~20210216~3.200~~3.200~2630.75~3962.53~~000000961982~/~1831299874~03~001~0000000000000~?~N~05359621170~0~0.00~0.00~?~0.00~28~1366579138~?~304~1~01
Thank you!
Bookmarks