Message 1 of 7
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Good day,
I've been working a long time on a work around for some heavy manual drawing labor.
The last thing I really need from iLogic, is to post all filenames from a specified directory,
to excel cells.
Right now I can make my code post the first name in the directory, and change to the next empty row,
but I cant get it to post all names.
Dim di As New IO.DirectoryInfo("P:\KUNDER\" & pathMappe & "\" & sOrdreNr & "\")
Dim diar1 As IO.FileInfo() = di.GetFiles("*.dxf")
Dim files As List(Of String) = New List(Of String)
Worksheet = ("C:\Users\mho\Desktop\test123.xlsx")
Sheetno = ("Ark1")
GoExcel.Open(Worksheet, Sheetno)
RowStart = 2
RowEnd = 100
For count = RowStart To RowEnd
If String.IsNullOrEmpty(GoExcel.CellValue("A" & count)) Then
i = i + 1
End If
Next
row = RowEnd - i + 1
For Each fi As IO.FileInfo In diar1
GoExcel.CellValue("A" & row) = fi.Name
Next
GoExcel.Save
This is my code. I use my Userparameters from my asm file, to find my directory, and I want to specify I only need .dxf files to be posted to excel.
I will use this with Lantek Expert, to run a processes which takes the files, and nest them for our fiber laser cutter, hence why all the file names specified is a must.
Any help would be greatly appriciated!
Solved! Go to Solution.