Results 1 to 32 of 32

Thread: Export to Excel or creat a txt.file

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2009
    Posts
    64

    Export to Excel or creat a txt.file

    Hello everybody,

    In my small program, I'm exporting data from a MSFlexgrid to Excel.
    HTML Code:
    Private Sub Command7_Click()
    
    Dim xlObject    As Excel.Application
    Dim xlWB        As Excel.Workbook
         
        Set xlObject = New Excel.Application
    
        'This Adds a new woorkbook, you could open the workbook from file also
        Set xlWB = xlObject.Workbooks.Add
                   
        Clipboard.Clear 'Clear the Clipboard
        With MSFlexGrid1
            'Select Full Contents (You could also select partial content)
            .Col = 0               'From first column
            .Row = 0               'From first Row (header)
            .ColSel = .Cols - 1    'Select all columns
            .RowSel = .Rows - 1    'Select all rows
            Clipboard.SetText .Clip 'Send to Clipboard
        End With
               
        With xlObject.ActiveWorkbook.ActiveSheet
            .Range("A1").Select 'Select Cell A1 (will paste from here, to different cells)
            .Paste             'Paste clipboard contents
        End With
       
        ' This makes Excel visible
        xlObject.Visible = True
         MsgBox "File Creation Complete"
    End Sub
    But in column J - K - L and M, instead of exporting the number in the real format like that for example: "200908250700" it writes: 2.01E+11.

    What can I do to prevent that?

    Thanks for your help.

  2. #2
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Export to Excel or creat a txt.file

    Quote Originally Posted by wilder1926 View Post
    ... instead of exporting the number in the real format like that for example: "200908250700" it writes: 2.01E+11...
    That's hardly an export issue - rather formatting.
    After you copy data to excel you may format entire column using [if I am not mistaken] FormatNumber property:

    xlObject.ActiveWorkbook.ActiveSheet.Columns("A").FormatNumber = "whatever" <<< check actual value directly in Excel.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Aug 2009
    Posts
    64

    Re: Export to Excel or creat a txt.file

    Can I export that in a txt file instead of excel?

  4. #4
    Discovering Life Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    12,001

    Re: Export to Excel or creat a txt.file

    Yes you can. But for a simple solution why do you want to recode????

    Try this...

    vb Code:
    1. Range("A1").Value = "'" & Range("A1").Value

    The above is a very basic example of how to change the value of the cell A1. Please amend it as per your requirement.

    Basically I am storing 200908250700 as '200908250700 in the cell. The ' will store the number as string...
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved


    MyGear:
    ★ CPU ★ Ryzen 5 5800X
    ★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
    ★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
    ★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
    ★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
    ★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
    ★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
    ★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
    ★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
    ★ Keyboard ★ TVS Electronics Gold Keyboard
    ★ Mouse ★ Logitech G502 Hero

  5. #5
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Export to Excel or creat a txt.file

    You can indeed, but note that it wont be easy to read (as there is no formatting, so how it is displayed is up to the program that shows it, including whatever font options the user has selected).

    For information on how to write to a text file, see the "Files" section of our Classic VB FAQs (in the FAQ forum)

    In this particular case the data you want to write is .Clip

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Aug 2009
    Posts
    64

    Re: Export to Excel or creat a txt.file

    I did something in VBA about the same thing. It transfert an excel sheet in a txt file. That text file, i can upload the data into another program in a specific format.

    I would like to do the same thing with VB6, starting from the MSFlexgrid. By doing this, i have one step less to do.

    Here is my vba code:
    Code:
     'vFieldArray contains field lengths, in characters, from field 1 to BH
            vFieldArray = Array(1, 1, 12, 6, 6, 12, 12, 11, 3, 12, 12, 12, 12, 12, 1, 20, 12, 1, 1, 3, 1, 12, 20, 11, 20, 7, 20, 11, 1, 12, 12, 12, 12, 1, 20, 12, 12, 12, 1, 50, 12, 75, 1, 1, 12, 6, 6, 9, 6, 6, 12, 5, 35, 1, 50)
            nFileNum = FreeFile
            Open "C:\Documents and Settings\All Users\Desktop\ordtemp." For Output As #nFileNum
            For Each myRecord In Range("A8:A" & _
                    Range("A" & Rows.Count).End(xlUp).Row)
                With myRecord
                    For i = 0 To 41
                        sOut = sOut & DELIMITER & Left(.Offset(0, i).Text & _
                                String(vFieldArray(i), PAD), vFieldArray(i))
                    Next i
                    Print #nFileNum, Mid(sOut, Len(DELIMITER) + 1)
                    sOut = Empty
                    For i = 42 To UBound(vFieldArray)
                        sOut = sOut & DELIMITER & Left(.Offset(0, i).Text & _
                                String(vFieldArray(i), PAD), vFieldArray(i))
                    Next i
                    Print #nFileNum, Mid(sOut, Len(DELIMITER) + 1)
                    sOut = Empty
                End With
            Next myRecord
            Close #nFileNum
            
           
            
            
     ' Open our source file
      f1 = FreeFile
      Open "C:\Documents and Settings\All Users\Desktop\ordtemp." For Input As #f1
    
      ' Open our target file
      f2 = FreeFile
      Open "C:\Documents and Settings\All Users\Desktop\ord." For Output As #f2
    
      ' Start processing till we reach the end
      Do While Not EOF(f1)
        ' Read a line from the source file
        Line Input #f1, x
    
        ' And if the line isn't empty, write it to the target file
        If x <> "                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            " Then
          If x <> "                                                                                                                                                      " Then
          Print #f2, x
        End If
        End If
      Loop
    
      ' Close the two opened files
      Close #f2
      Close #f1
            
            'Delete the unecessary temp file
            strFile = "C:\Documents and Settings\All Users\Desktop\ordtemp."
    
            Set fs = CreateObject("Scripting.FileSystemObject")
    
            fs.deletefile strFile
      
             'This formats name of the text file to be ord.YYYYMMDDHHMI
            OldFile1 = "C:\Documents and Settings\All Users\Desktop\ord."
            newfile1 = Format(Now, "yyyymmddhhmmss")
            newfile1 = OldFile1 & newfile1
            Name OldFile1 As newfile1

  7. #7
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Export to Excel or creat a txt.file

    Quote Originally Posted by koolsid View Post
    Basically I am storing 200908250700 as '200908250700 in the cell. The ' will store the number as string...
    You really don't want to do that - Excel may not be be able to perform calculations.
    We had this issue not long ago when someone did just that same mistake and it took some time to troubleshoot it.

  8. #8
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Export to Excel or creat a txt.file

    Quote Originally Posted by wilder1926 View Post
    I did something in VBA about the same thing. It transfert an excel sheet in a txt file. That text file, i can upload the data into another program in a specific format.

    I would like to do the same thing with VB6, starting from the MSFlexgrid. By doing this, i have one step less to do.

    Here is my vba code:
    That would be a good idea, and you can use almost exactly the same code.

    You just need to change the For/Next loop to use row numbers (.FixedRows To .Rows-1 ) instead of a Range, remove the With/EndWith, and change .Offset(0, i).Text to use MSFlexGrid1.TextMatrix with apt parameters.

  9. #9
    Discovering Life Siddharth Rout's Avatar
    Join Date
    Feb 2005
    Location
    Mumbai, India
    Posts
    12,001

    Re: Export to Excel or creat a txt.file

    Quote Originally Posted by RhinoBull View Post
    You really don't want to do that - Excel may not be be able to perform calculations.
    We had this issue not long ago when someone did just that same mistake and it took some time to troubleshoot it.
    It's not the case Rhino. You can still perform calculations...

    Here is a sample sheet with a very basic calculation...
    Attached Files Attached Files
    A good exercise for the Heart is to bend down and help another up...
    Please Mark your Thread "Resolved", if the query is solved


    MyGear:
    ★ CPU ★ Ryzen 5 5800X
    ★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
    ★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
    ★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
    ★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
    ★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
    ★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
    ★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
    ★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
    ★ Keyboard ★ TVS Electronics Gold Keyboard
    ★ Mouse ★ Logitech G502 Hero

  10. #10

  11. #11
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Export to Excel or creat a txt.file

    ... and btw, your basic spreadsheet already shows warning message:

    "The number in this cell is formatted as text or preceded by an apostrophe"

    and that is a huge problem for any accountant or anyone who deals with numbers in Excel.

  12. #12

    Thread Starter
    Lively Member
    Join Date
    Aug 2009
    Posts
    64

    Re: Export to Excel or creat a txt.file

    Quote Originally Posted by si_the_geek View Post
    You just need to change the For/Next loop to use row numbers (.FixedRows To .Rows-1 ) instead of a Range, remove the With/EndWith, and change .Offset(0, i).Text to use MSFlexGrid1.TextMatrix with apt parameters.
    Ok, I will try to understand all this. Since I'm new to VB6, it's really not easy.

    Thanks again for you help everybody.

  13. #13

    Thread Starter
    Lively Member
    Join Date
    Aug 2009
    Posts
    64

    Re: Export to Excel or creat a txt.file

    Quote Originally Posted by si_the_geek View Post
    You just need to change the For/Next loop to use row numbers (.FixedRows To .Rows-1 ) instead of a Range, remove the With/EndWith, and change .Offset(0, i).Text to use MSFlexGrid1.TextMatrix with apt parameters.
    I'm reading, again an again, and I don’t understand that part.

    Could you start me so I would understand more please?

    I'm using MSDN, but still. That one is more that tuff.

    Thanks again.

  14. #14
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Export to Excel or creat a txt.file

    Here's a start... Change this:
    Code:
            For Each myRecord In Range("A8:A" & _
                    Range("A" & Rows.Count).End(xlUp).Row)
                With myRecord
                    For i = 0 To 41
                    ...
                    sOut = Empty
                End With
            Next myRecord
    to this:
    Code:
    Dim lngRow as Long
            For lngRow = MSFlexGrid1.FixedRows to MSFlexGrid1.Rows - 1
                    For i = 0 To 41
                    ...
                    sOut = Empty
            Next lngRow
    You still have this part to do:
    and change .Offset(0, i).Text to use MSFlexGrid1.TextMatrix with apt parameters.
    Note that lngRow should be one of those parameters.

  15. #15

    Thread Starter
    Lively Member
    Join Date
    Aug 2009
    Posts
    64

    Re: Export to Excel or creat a txt.file

    Thanks again

    After a few hours of work and reading,
    Here the update:
    Code:
    Dim MyFreeFile As Integer
    Dim icol As Integer
    Dim irow As Integer
    Dim MyString As String
    MyFreeFile = FreeFile
    Open "C:\Documents and Settings\All Users\Desktop\ord" For Output As MyFreeFile
    For irow = 1 To MSFlexGrid1.Rows - 1    'Start from top to bottom
        For icol = 0 To MSFlexGrid1.Cols - 1    'Start from left to Right
            MyString = MyString & MSFlexGrid1.TextMatrix(irow, icol) & _
                IIf((icol = MSFlexGrid1.Cols - 1), "", ",")     'Add value in mystring for each column in Flexgrid
        Next
        Print #MyFreeFile, MyString  'Print to notepad
        MyString = ""   'Reset MyString
    Next
    
    Close MyFreeFile
    
    MsgBox "File Creation Complete"
    I'm still trying to introduce that part instead of ",":
    Code:
     vFieldArray = Array(1, 1, 12, 6, 6, 12, 12, 11, 3, 12, 12, 12, 12, 12, 1, 20, 12, 1, 1, 3, 1, 12, 20, 11, 20, 7, 20, 11, 1, 12, 12, 12, 12, 1, 20, 12, 12, 12, 1, 50, 12, 75, 1, 1, 12, 6, 6, 9, 6, 6, 12, 5, 35, 1, 50)
    It his where all columns must start (Position) with the value.

  16. #16
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Export to Excel or creat a txt.file

    Code:
    For irow = 1 To MSFlexGrid1.Rows - 1    'Start from top to bottom
        For icol = 0 To MSFlexGrid1.Cols - 1    'Start from left to Right
    Rather than starting at specific row/column numbers, it is better to use FixedRows and FixedCols as I did - that way it takes into account the amount of header rows and columns that you have at the time (so if you ever change that, you don't need to change this code).


    As for the code inside the loop, you wanted the same as you had before - so you should only have changed where the data is coming from (TextMatrix instead of Offset).

  17. #17

    Thread Starter
    Lively Member
    Join Date
    Aug 2009
    Posts
    64

    Re: Export to Excel or creat a txt.file

    So if I understand good, the first part look like that:
    Code:
    Dim vFieldArray As Variant
           
             Const DELIMITER As String = "" 'Normally none
            Const PAD As String = " "   'or other character
            Dim vFieldArray As Variant
            Dim myRecord As Range
            Dim nFileNum As Long
            Dim i As Long
            Dim sOut As String
            Dim lngrow As Long
    
    
    
    
    
    
    'vFieldArray contains field lengths, in characters, from field 1 to BH
            vFieldArray = Array(1, 1, 12, 6, 6, 12, 12, 11, 3, 12, 12, 12, 12, 12, 1, 20, 12, 1, 1, 3, 1, 12, 20, 11, 20, 7, 20, 11, 1, 12, 12, 12, 12, 1, 20, 12, 12, 12, 1, 50, 12, 75, 1, 1, 12, 6, 6, 9, 6, 6, 12, 5, 35, 1, 50)
            nFileNum = FreeFile
            Open "C:\Documents and Settings\All Users\Desktop\ordtemp." For Output As #nFileNum
    For lngrow = MSFlexGrid1.FixedRows To MSFlexGrid1.Rows - 1
                    For i = 0 To 41
    
                        sOut = sOut & DELIMITER & Left(.Offset(0, i).Text & _
                                String(vFieldArray(i), PAD), vFieldArray(i))
                    Next i
                    Print #nFileNum, Mid(sOut, Len(DELIMITER) + 1)
                    sOut = Empty
                    For i = 42 To UBound(vFieldArray)
                        sOut = sOut & DELIMITER & Left(.Offset(0, i).Text & _
                                String(vFieldArray(i), PAD), vFieldArray(i))
                    Next i
                    Print #nFileNum, Mid(sOut, Len(DELIMITER) + 1)
                    sOut = Empty
            Next lngrow
            Close #nFileNum
    Now i have to change this part:
    Code:
      ' Start processing till we reach the end
      Do While Not EOF(f1)
        ' Read a line from the source file
        Line Input #f1, x
    
        ' And if the line isn't empty, write it to the target file
        If x <> "                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            " Then
          If x <> "                                                                                                                                                      " Then
          Print #f2, x
        End If
        End If
      Loop
    Is that write?

  18. #18
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Export to Excel or creat a txt.file

    Quote Originally Posted by si_the_geek
    so you should only have changed where the data is coming from (TextMatrix instead of Offset).
    Quote Originally Posted by wilder1926
    Code:
                        sOut = sOut & DELIMITER & Left(.Offset(0, i).Text & _
                                String(vFieldArray(i), PAD), vFieldArray(i))

  19. #19
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Export to Excel or creat a txt.file

    Quote Originally Posted by si_the_geek View Post
    Rather than starting at specific row/column numbers, it is better to use FixedRows and FixedCols as I did...
    That increases the risk of loosing a whole lot of data - not always we use fixed rows/cols to present headers, they often hold actual data.
    So, in my opinion it is much safer to specify row/col index from which you want to start.

  20. #20
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Export to Excel or creat a txt.file

    If you use fixed rows/cols for data then I agree with using hard-coded numbers, but in other cases (which seems to be the vast majority) starting your loops at FixedRows and FixedCols makes more sense - because it means that if the amount of fixed rows/cols changes later (but still don't contain actual data), even if you don't change the code you wont lose (or 'gain') data.

    I don't see how there is any increased risk, because you should know if the fixed rows/cols have data in them when you write the loops - and if that changes, the code would need to be checked (and probably changed) in either case.

  21. #21

  22. #22
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Export to Excel or creat a txt.file

    If your fixed rows/cols contain data, using numbers is better - because it means you get all of the data.

    If they don't (which seems to usually be the case), using FixedRows/FixedCols is better - because it means you get all of the data (and no headers), even if the amount of FixedRows/FixedCols changes at a later date.


    So, if your fixed cols contain data but your fixed rows don't, using FixedRows and a column number is best.

    Whichever way it is done, if the situation changes you should clearly be checking the code anyway, and changing it if needed.

  23. #23
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Export to Excel or creat a txt.file

    Quote Originally Posted by si_the_geek View Post
    If your fixed rows/cols contain data, using numbers is better - because it means you get all of the data.

    If they don't (which seems to usually be the case), using FixedRows/FixedCols is better...
    In my world they most often do - headers could be anything from invoice_id to [say] week_of kind od data and you can't afford to loose any of it.
    Which is why I said "it is safer to use row/col index"...
    As you know people get into a habit reusing their code and if you use FixedCols/Rows once then... well, you the rest.
    I always tried to avoid using those properties when exporting/transfering data unless it was absolutely necessary.

  24. #24
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Export to Excel or creat a txt.file

    I understand it in your situation, but that is not the same situation that is usually seen on the forums (which is why most experienced people recommend FixedRows/FixedCols).


    When it comes to code re-use, it doesn't make a difference which of the methods you use - neither of them are correct for all situations.

    If the re-use is copy+paste, you should obviously always be checking that the loops are apt anyway. When it comes to subs/functions/etc, it should either be made clear in the usage notes at the top of the routine(s), or have a parameter/property to specify.

    For my generic flexgrid routines, I have optional parameters for starting row/col numbers, with the default being -1 (to indicate that FixedRows/FixedCols should be used).

  25. #25
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Export to Excel or creat a txt.file

    Quote Originally Posted by si_the_geek View Post
    I understand it in your situation, but that is not the same situation that is usually seen on the forums (which is why most experienced people recommend FixedRows/FixedCols)...
    No intension to argue any further (pointless) so I’m just curios – who are those people?

  26. #26
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Export to Excel or creat a txt.file

    No intension to argue any further (pointless)
    Indeed, because there is no 'right' answer.. it depends on the situation.

    so I’m just curios – who are those people?
    It is hard to find examples, because usage of it in code rarely shows up in a search (presumably due to the . confusing our search engine), but I clearly remember two people and have managed to find examples for them: brucevde and jcis

  27. #27

    Thread Starter
    Lively Member
    Join Date
    Aug 2009
    Posts
    64

    Re: Export to Excel or creat a txt.file

    You are loosing me guys.

    Now, I don’t understand anymore.

  28. #28

  29. #29

    Thread Starter
    Lively Member
    Join Date
    Aug 2009
    Posts
    64

    Re: Export to Excel or creat a txt.file

    Everything.

    I just wanted to add that function to a program that was made. IT's not that I'm working in VB6 all the time.

    It's to hard to make just for a one time job.

    Thanks
    Last edited by wilder1926; Aug 28th, 2009 at 09:48 AM.

  30. #30
    Just a Member! seenu_1st's Avatar
    Join Date
    Aug 2007
    Location
    India
    Posts
    2,170

    Re: Export to Excel or creat a txt.file

    Quote Originally Posted by wilder1926 View Post
    Hello everybody,

    In my small program, I'm exporting data from a MSFlexgrid to Excel.
    HTML Code:
    Private Sub Command7_Click()
    
    Dim xlObject    As Excel.Application
    Dim xlWB        As Excel.Workbook
         
        Set xlObject = New Excel.Application
    
        'This Adds a new woorkbook, you could open the workbook from file also
        Set xlWB = xlObject.Workbooks.Add
                   
        Clipboard.Clear 'Clear the Clipboard
        With MSFlexGrid1
            'Select Full Contents (You could also select partial content)
            .Col = 0               'From first column
            .Row = 0               'From first Row (header)
            .ColSel = .Cols - 1    'Select all columns
            .RowSel = .Rows - 1    'Select all rows
            Clipboard.SetText .Clip 'Send to Clipboard
        End With
               
        With xlObject.ActiveWorkbook.ActiveSheet
            .Range("A1").Select 'Select Cell A1 (will paste from here, to different cells)
            .Paste             'Paste clipboard contents
        End With
       
        ' This makes Excel visible
        xlObject.Visible = True
         MsgBox "File Creation Complete"
    End Sub
    But in column J - K - L and M, instead of exporting the number in the real format like that for example: "200908250700" it writes: 2.01E+11.

    What can I do to prevent that?

    Thanks for your help.
    if the purpose of these numbers not to be calculated and only for refrence or printing purpose then u can use single quote in front of the numbers like '1236475775848477, and set those columns autofit then it wil be considered as text and u can view them fully.
    Seenu

    If this post is useful, pls don't forget to Rate this post.
    Pls mark thread as resolved once ur problem solved.
    ADO Tutorial Variable types SP6 for VB6, MsFlexGrid fast fill, Sorting Algorithms


  31. #31

    Thread Starter
    Lively Member
    Join Date
    Aug 2009
    Posts
    64

    Re: Export to Excel or creat a txt.file

    Thanks for your code for excel.

    At this point, I was more focusing on the txt file.

    But I will keep the code just in case.

    Thanks seenu_1st

  32. #32

    Thread Starter
    Lively Member
    Join Date
    Aug 2009
    Posts
    64

    Re: Export to Excel or creat a txt.file

    Hello again,

    I will show you a few image of my MSFlexgrid, and also 2 text files that I did manually of what it's suppose to look like at the end.

    Maybe it will help.

    Thanks again.
    Attached Files Attached Files

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width