String Conversation

How can I use string form a text document and convert it to a excel spread sheet.

Comments

  • : How can I use string form a text document and convert it to a excel spread sheet.
    :

    Excel understans comma delimted files.

    Create a string or a row of strings separated by commas. End each line with a line feed. Save the file as *.csv (myfile.csv).

    You can also use the first row to designate the column names.

    [code]
    "FirstName", "LastName", "Position"
    "John", "Doe", "Intern"
    "Jane", "Doe", "Supervisor"
    [/code]
  • Good reply! Quite informative :-D
  • : How can I use string form a text document and convert it to a excel spread sheet.

    Make a copy of the Word-doc to an Excel-page. Earlier I made a working whole program, some parts are copied below.

    PART A:
    'Maak nieuwe Persoverzicht
    Set xlBook = xlApp.Workbooks.Add 'Kan Blad1 of Sheet1 heten
    ActiveSheet.Name = "Klad" 'Hernoem Blad1 of Sheet1 naar Klad
    xlBook.Worksheets.Add 'Kan Blad1 of Sheet1 heten
    ActiveSheet.Name = "Data" 'Hernoem Blad1 of Sheet1 naar Data
    'xlApp.ActiveWorkbook.SaveAs "Persrapportage"

    'xlApp.Visible = True
    'MsgBox "Wacht even"

    'Laat de voortgangsbalken zien
    ProgressBar1.Min = 0
    ProgressBar1.Max = 100
    ProgressBar1.Value = 0
    ProgressBar1.Visible = True
    intRegel = 2
    'dtmresttijd=
    Screen.MousePointer = vbHourglass

    'Vereist Reference
    Dim WordApp As Word.Application
    Dim WordDoc As Word.Document
    Set WordApp = New Word.Application

    PART B:
    For index = 0 To filList.ListCount - 1
    filList.ListIndex = filList.ListIndex + 1
    Set WordDoc = WordApp.Documents.Open(dirList & "" & filList.FileName)
    WordApp.Visible = True
    'MsgBox WordApp.ActiveDocument.ProtectionType '0 = protected
    'Het is bekend dat sommige bestanden beveiligd zijn, maar zonder wachtwoord!
    If WordApp.ActiveDocument.ProtectionType <> wdNoProtection Then WordApp.ActiveDocument.Unprotect

    'Ga naar regel 7
    WordApp.Selection.GoTo What:=wdGoToLine, Which:=wdGoToFirst, Count:=7, Name:=""
    WordApp.Selection.MoveDown Unit:=wdScreen, Count:=8, Extend:=wdExtend
    WordApp.Selection.Copy

    xlApp.Visible = True
    xlApp.Sheets("Klad").Select
    xlApp.Range("A1").Activate

    xlApp.ActiveWorkbook.ActiveSheet.Paste

    Call opslag1

    ProgressBar1.Value = 100 * (index / filList.ListCount)
    WordApp.ActiveDocument.Close
    Next index



  • : Good reply! Quite informative :-D
    :
    A mis-click on my part....whoops!!
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories