Automating Importing Multiple CSV Text Files - VBA Excel 2010
HTML-код
- Опубликовано: 6 сен 2024
- VBA Excel 2010 - Automating Importing CSV Text Files - Importing Multiple CSV Tab Delimited Text Files using VBA and deleting a Workbook Connection
Handy Excel Resources
amzn.to/3gFx7s1 - Excel Formulas & Functions For Dummies 5th Edition
amzn.to/3sYnuH6 - Microsoft Excel 2019 VBA and Macros
amzn.to/2PqXhU0 - MICROSOFT EXCEL VBA AND MACROS FOR BEGINNERS:
amzn.to/3xtsLtM - Microsoft Excel VBA Programming for the Absolute Beginner
amzn.to/3xwkEg0 - Excel 2019 Bible
amzn.to/3aJEHxW - EXCEL 2020 FOR BEGINNERS
As an Amazon Associate, I earn from qualifying purchases. Product prices and availability are subject to change.
How to extract text or specific text only from notepad to Excel using VBA
I also get an error on:
" .Refresh BackgroundQuery:=False"
It shows Runtime Error 1004
Can you help me with this?
thank you so much Alex for this video very explicit with Cristal clear steps ... found it very useful to import data from multiple CSV files ..will tweak it a bit by making a single data file with no repeated headers or ampty rows
Love your very concise and straight to the point Video on this very popular topic Alex. Thanks mate.
This is a great tutorial, thanks so much! Question...if I wanted to vary the reps (as in, I will be importing a variable number of .csv files each time I use the macro) how would I set the variable?
Thank you so much!
What do I do if I want my second data to be imported into a specific column?
Can i copy this code somewhere ??
Ill try running this but i got this error message, compiler error: invalid Next control variable reference, would be glad if you can help me sort this out. thanks!
Very nice and comprehensive video. Thanks. If I import the csv once again, (with the previous data left there) it'll start to import from the first empty leftmost column. What if I wanted just overwrite the same area. Why it doesn't use $A$1 as first cell..?
FInally - got it. Just use RefreshStyle = xlOverwriteCells property indtead of .RefreshStyle = xlInsertDeleteCells
HI Alex. Is there a way to create a validation check to ensure that all of the data from each file is being transferred? I've searched everywhere and haven't been able to find anything re importing .txt files. Thanks, your videos are awesome!
Thanks for your great video.. Can you please show how to paste the outputs of each subsequent csv file in the different columns? mean output row to output column. Thanks.
Since thanks ! Wonderful tutorial. A quick demo followed by steps to achieve .. nicely presented. BR
Is it possible to change the commas in columns F through H into semi-colons?
Awesome :) great work thanks for adding the the idea of the connections code its something i hadn't thought of.
This saved us a lot of time. Thank you!!
I get an error on:
" .Refresh BackgroundQuery:=False"
It shows Runtime Error 1004
I appreciate any help you can give.Thanks!
How can I get the codes?
Is there a way to import the files in new worksheet. means 1 file in one new existing worksheet
I have the same problem with "Subscript out of range"
Ok but you could have provided code's text in comments.
Using this procedure system fail reporting out of memory, solved using open files and copy paste
Hi Alex, Thanks for this video. Very helpful.
Hi Sir,
I get an error on:
" .Refresh BackgroundQuery:=False"
It shows Runtime Error 1004
Can you help me with this?
Thanks a lot!
brilliant 10/10
Code runs with no errors but, is not deleting the connections for the file! Any ideas!!
Dim My_Query As WorkbookQuery
For Each My_Query In ActiveWorkbook.Queries
If InStr(failsGAN, My_Query.Name) > 0 Then
My_Query.Delete
End If
Next My_Query
Is there a way to have it import each subsequent csv file into the next open row?
Kevin Hess Yes. You will need to change the row_number variable to be the following (assumimg that you are entering data into column A (1)):
row_number = Worksheets("sheetname').Cells(Rows.Count, 1).End(xlUp).Row + 1
Where sheetname is the name of the sheet that you are entering data onto.
Thanks a lot !!
Good stuff