I need to export the rows from the attached excel file in to multiple txt files. Each row will be exported to a different txt file with filename the last columns data.
I have written a VB code but it doesn't work with unicode data. I need to export Greek text in the file. Can anyone help by writing a new code or by tweaking mine? Book1.xls
Sub TextFile()Dim fs As Object, a As Object, i As Long, s As String, lngLastRow As LongSet fs = CreateObject("Scripting.FileSystemObject")lngLastRow = Cells(Rows.Count, "G").End(xlUp).RowFor i = 2 To lngLastRow Step 1 Set a = fs.CreateTextFile("C:\Temp\" & Range("G" & i).Value & ".txt", True) s = s & Cells(i, 1) & vbCrLf & Cells(i, 2) & vbCrLf & Cells(i, 3) & vbCrLf & Cells(i, 4) & vbCrLf & Cells(i, 5) & vbCrLf & Cells(i, 6) & vbCrLf & Cells(i, 7) & vbCrLf & Cells(i, 8) & vbCrLf & Cells(i, 9) a.WriteLine s s = "" a.CloseNext iEnd Sub
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications. You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
Excel allows various different methods to link Excel files to each other. This includes relative paths, mapped drives (or the local drive) and UNC paths. UNC paths are the least robust of the three.
A query can call a function, and a function can call Excel, even though we are in Access. This is Part 2, and steps you through the VBA that "wraps" Excel functionality so we can use its worksheet functions in Access.
The declaration statement de…