Jump to content

Recommended Posts

Posted

I have a nice little GUI app gathering various system information, mostly log files, for the user to read on request. Everything is working great because I've put the information into simple text files that are just pulled up in notepad when the corresponding radio button is selected. However, I've dumped the APP and SYS logs into comma delimited files. They pull up in Excel just fine, but without the delimiters. I've attached the tiny snipit of code I'm talking about. How can I get the file to load the way I want it to without adding a whole mousemove type script?

Thanks in advance!

Case $msg = $APP
   If GUIRead($APP) = $GUI_CHECKED Then
      Run ("C:\Program Files\Microsoft Office\Office10\excel.exe c:\app.txt")
   EndIf

Two wrongs don't make a right, but three lefts do

Posted

Sorry, but that works exactly the same. The file opens, it's just not recognizing the delimiters.

Two wrongs don't make a right, but three lefts do

Posted

Simply rename your file (or copy it and launch the copy) to app.csv and everything should be just fine.

Note that I'm unsure it will work really fine if your delimiter is a semi-colon instead of the usual comma...

A good program computing A into B is mostly one that won't crash in all the other cases...
Posted

Thank you CyberSlug and LazyCoder!!

(You can explain to Larry for me if you're so inclined.) :lmao:

Saved me a whopping 22 lines of code opening the app, then the file and walking through the wizard. <yuck!> AND, it's a much cleaner presentation.

Maybe someday I'll be able to answer some questions instead of asking them all the time. o:)

Two wrongs don't make a right, but three lefts do

  • 2 years later...
Posted

Thank you CyberSlug and LazyCoder!!

(You can explain to Larry for me if you're so inclined.) :whistle:

Saved me a whopping 22 lines of code opening the app, then the file and walking through the wizard. <yuck!> AND, it's a much cleaner presentation.

Maybe someday I'll be able to answer some questions instead of asking them all the time. :lmao:

$oExcel = _ExcelBookOpenTxt($sFilePath, $sDelimiter = ",", $iStartRow = 1, $iDataType = 1, $iTextQualifier = 1, $fConsecDelim = False, $fVisible = 1)

I attached the excel UDF I used (found in the forum)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...