Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Peek inside of file redux
#1
Here's some code I have for giving me the first few lines of a file but it doesn't work or csv files for some reason. I couldn't find a reason in the function it's calling. Am I overlooking something?

Function Peek_into_file
Trigger ^Shell_menu "Pee&k Into File"     Help - how to add the trigger to the macro
Code:
Copy      Help
File f.Open(a)
str s
int i
for i 0 10
,if(!f.ReadLine(s)) break
,out s

Thanks.
An old blog on QM coding and automation.

The Macro Hook
#2
Here works. I saved in Excel. Also tested with different newline forms, also works.
#3
turns out it's a csv created by SQL Server2005.
An old blog on QM coding and automation.

The Macro Hook
#4
Maybe it is unicode. Then File.ReadLine will not work.


Forum Jump:


Users browsing this thread: 1 Guest(s)