PDA

View Full Version : Reference large spreadsheets without opening them



ChrisAcheson
09-27-2019, 05:25 AM
Hi forum members...

I have a daily spreadsheet which on average is 400,000 KB in size.

Is it possible, to have a txt file or equivalent with between 100-1000 entries on, that the primary workbook is able to reference ID's on the txt file without opening - in the background, and export the full lines of the referenced ID's onto a fresh xlsx - being small enough to then review quickly.

If yes, would anyone be able to point me in the right direction?

Thank you.

snb
09-27-2019, 06:16 AM
Use e.g.:


Sub OpenLatestFile()
c00 = "\\\Output\Chris\*shopone"
with Getobject(Split(CreateObject("wscript.shell").exec("cmd /c dir """ & c00 & """ /b/s/a-d/o-d").stdout.readall, vbCrLf)(0))
sn=.sheets(1).usedrange
.close 0
end with
End Sub