Announcement

Collapse
No announcement yet.

Export files type Random from pb3.5 to Excel

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Export files type Random from pb3.5 to Excel

    How to export data from files type Random in PowerBasic to the EXCEL of Windows 98

  • #2
    The first thing that comes to mind is to create a CSF (comma separated file) and then import the file into Excel/Access, etc. Of course this would require manual work, but the 'importing' phase could be accompished with a VBA script in Excel I suppose.

    The second idea is to write a Windows application that can read the random-access file and then use the ODBC interface to store the data in Excel's own native database files. With PB/CC you can read the files just like you can do in PB/DOS, and if you combine this with an ODBC toolkit (like SQLTools from www.perfectsync.com ) then you'll be able to perform the whole task programmatically. As a bonus, you can SHELL to a PB/CC application directly from PB/DOS and continue on when the app finishes - you'll need to be running at least Windows 95, however, as that is the 'lowest' Win32 platform PB/CC applications will work with.


    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>
    Lance
    mailto:[email protected]

    Comment


    • #3
      The first thing that comes to mind is to create a CSF (comma separated file) and then import the file into Excel/Access, etc. Of course this would require manual work, but the 'importing' phase could be accompished with a VBA script in Excel I suppose.
      Hey, Lance, how about something in PB instead of VB?

      ------------------
      [email protected]
      Don M. / aka thimk at thimk dot biz

      http://powerbasic.thimk.biz/

      Comment


      • #4
        Create a tab delimited file (much better than csv) called data.txt and then:

        start excel data.txt

        or

        The excel macro language since excel5 is basic and it can be used on random files.

        Comment


        • #5
          Originally posted by Donald Miller:
          Hey, Lance, how about something in PB instead of VB?
          Sure... check out the EXCEL examples that ship with PB/CC 3.0 and PB/Win 7.0... they show you how to send data to Excel via COM. (the ealier reply did not mention COM since PowerBASIC's Windows compilers did not support COM back in 2000!)

          However, that sort of functionality is is not possible from DOS... so the CSV or TSV technique is still a valid approach from DOS.



          ------------------
          Lance
          PowerBASIC Support
          mailto:[email protected][email protected]</A>
          Lance
          mailto:[email protected]

          Comment

          Working...
          X