Jump to content

RESOLVED: Import csv file to new notebook, each row new note


Recommended Posts

About a year ago, I imported (to Excel) all my Dad's address database from Palm data and massaged it so that all the relevant data classifications existed on every line in the spreadsheet, one line for each record.

 

Somehow that was converted into something which then was imported into a new Evernote notebook, one new note for every row of the spreadsheet.

 

I thought the solution was nearly perfect. Then I discovered that Evernote has NO features for low vision folks, so the solution wouldn't work for my Dad. I deleted my new notebook.

 

A year later we still don't have an adequate solution and my Dad is still gamely trying to read his Palm data on his Windows computer. So, I'd like to retry the same solution, since it may be a poor improvement on the Palm data.

 

But I can't remember how I got from the Excel spreadsheet to the automated EN import. Searching EN Discussions hasn't produced anything useful.

 

Currently I'm EN 5.8.3 but wasn't a year ago. Windows 7 x64 EN Premium user.

 

Ideas?

Link to comment

I'm pretty sure that my husband wrote an Excel macro to export the row data, each to a text file. I have found the directory on my computer where the temporary text files were created.

 

So now I just have to locate Evernote help info telling me how to do an automated import.

 

Thanks for any advice you can give me.

Link to comment

Here 'tis ;)

 

Option Explicit
Sub ExportContacts()
'
' ExportContacts Macro
' Export Dads' Contacts for import to Evernote
'
' Keyboard Shortcut: Ctrl+Shift+E
'
Dim iRow As Long
Dim cName As String

Close #1
With ActiveSheet
For iRow = 1 To .Cells(.Rows.Count, "A").End(xlUp).Row
cName = .Cells(iRow, "E").Value
If cName = "'''" Then cName = .Cells(iRow, "A").Value & "_Header"
cName = Replace(cName, "/", "_")
cName = Replace(cName, "?", "_Q_")


Open "c:\tmp\Dad\" & cName & ".txt" For Output As #1
If .Cells(iRow, "B") <> "" Then Print #1, .Cells(iRow, "B").Value
If .Cells(iRow, "C") <> "" Then Print #1, .Cells(iRow, "C").Value
If .Cells(iRow, "D") <> "" Then Print #1, .Cells(iRow, "D").Value
If .Cells(iRow, "E") <> "" Then Print #1, .Cells(iRow, "E").Value
If .Cells(iRow, "F") <> "" Then Print #1, .Cells(iRow, "F").Value
If .Cells(iRow, "G") <> "" Then Print #1, .Cells(iRow, "G").Value
If .Cells(iRow, "H") <> "" Then Print #1, .Cells(iRow, "H").Value
If .Cells(iRow, "I") <> "" Then Print #1, .Cells(iRow, "I").Value
If .Cells(iRow, "J") <> "" Then Print #1, .Cells(iRow, "J").Value
If .Cells(iRow, "K") <> "" Then Print #1, .Cells(iRow, "K").Value
If .Cells(iRow, "L") <> "" Then Print #1, .Cells(iRow, "L").Value
If .Cells(iRow, "M") <> "" Then Print #1, .Cells(iRow, "M").Value
If .Cells(iRow, "N") <> "" Then Print #1, .Cells(iRow, "N").Value
If .Cells(iRow, "O") <> "" Then Print #1, .Cells(iRow, "O").Value
If .Cells(iRow, "P") <> "" Then Print #1, .Cells(iRow, "P").Value
If .Cells(iRow, "Q") <> "" Then Print #1, .Cells(iRow, "Q").Value
If .Cells(iRow, "R") <> "" Then Print #1, .Cells(iRow, "R").Value
If .Cells(iRow, "S") <> "" Then Print #1, .Cells(iRow, "S").Value
If .Cells(iRow, "T") <> "" Then Print #1, .Cells(iRow, "T").Value
If .Cells(iRow, "U") <> "" Then Print #1, .Cells(iRow, "U").Value
If .Cells(iRow, "V") <> "" Then Print #1, .Cells(iRow, "V").Value
If .Cells(iRow, "W") <> "" Then Print #1, .Cells(iRow, "W").Value
If .Cells(iRow, "X") <> "" Then Print #1, .Cells(iRow, "X").Value
If .Cells(iRow, "Y") <> "" Then Print #1, .Cells(iRow, "Y").Value
If .Cells(iRow, "Z") <> "" Then Print #1, .Cells(iRow, "Z").Value
If .Cells(iRow, "AB") <> "" Then Print #1, .Cells(iRow, "AB").Value
If .Cells(iRow, "AC") <> "" Then Print #1, .Cells(iRow, "AC").Value
If .Cells(iRow, "AD") <> "" Then Print #1, .Cells(iRow, "AD").Value
If .Cells(iRow, "AE") <> "" Then Print #1, .Cells(iRow, "AE").Value
If .Cells(iRow, "AF") <> "" Then Print #1, .Cells(iRow, "AF").Value
If .Cells(iRow, "AG") <> "" Then Print #1, .Cells(iRow, "AG").Value
If .Cells(iRow, "AH") <> "" Then Print #1, .Cells(iRow, "AH").Value
If .Cells(iRow, "AI") <> "" Then Print #1, .Cells(iRow, "AI").Value
If .Cells(iRow, "AJ") <> "" Then Print #1, .Cells(iRow, "AJ").Value
If .Cells(iRow, "AK") <> "" Then Print #1, .Cells(iRow, "AK").Value
If .Cells(iRow, "AL") <> "" Then Print #1, .Cells(iRow, "AL").Value
If .Cells(iRow, "AM") <> "" Then Print #1, .Cells(iRow, "AM").Value
If .Cells(iRow, "AN") <> "" Then Print #1, .Cells(iRow, "AN").Value
If .Cells(iRow, "AO") <> "" Then Print #1, .Cells(iRow, "AO").Value
If .Cells(iRow, "AP") <> "" Then Print #1, .Cells(iRow, "AP").Value
If .Cells(iRow, "AQ") <> "" Then Print #1, .Cells(iRow, "AQ").Value
If .Cells(iRow, "AR") <> "" Then Print #1, .Cells(iRow, "AR").Value
If .Cells(iRow, "AS") <> "" Then Print #1, .Cells(iRow, "AS").Value
If .Cells(iRow, "AT") <> "" Then Print #1, .Cells(iRow, "AT").Value
If .Cells(iRow, "AU") <> "" Then Print #1, .Cells(iRow, "AU").Value
If .Cells(iRow, "AV") <> "" Then Print #1, .Cells(iRow, "AV").Value
If .Cells(iRow, "AW") <> "" Then Print #1, .Cells(iRow, "AW").Value
If .Cells(iRow, "AX") <> "" Then Print #1, .Cells(iRow, "AX").Value
If .Cells(iRow, "AY") <> "" Then Print #1, .Cells(iRow, "AY").Value
Close #1
Next iRow
End With

End Sub
 

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...