chemie 17 Posted June 28, 2015 Posted June 28, 2015 I am learning a language and that requires creation of 4000 notes, that's a lot of copy and pasting and importing evernote files.instead this what I did,I created a template Exported as enex file, Opened enex file in excel and found the places that needs to be changed. VBA macro to change cell value export back to enex file Try to import back to Evernote.The last step is where I am stuck. I looked through the xml file for file I imported and file I created using Excel/VBAthey both look same.But when I import I am getting this message "Could not import notes, Error: INVALID_UTF8_DATA (Error in line 1, token"C:\Users\MyPC\Desktop\text01_01_001.enex") I would really appreciate your help I could not attach file so here is the file I created using excel vba<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE en-export SYSTEM "http://xml.evernote.com/pub/evernote-export3.dtd"><en-export export-date="20150627T003845Z" application="Evernote" version="Evernote Mac 6.0.11 (451577)"> <note><title>01-03-0</title><content><![CDATA[<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE en-note SYSTEM "http://xml.evernote.com/pub/enml2.dtd"> <en-note> <div><span style="font-size: 48px;">वृद्धिरादैच्। १.१.१</span></div> <table style="-evernote-table:true;border-collapse:collapse;margin-left:0px;table-layout:fixed;width:100%;"> <tr> <td style="border: 1px solid rgb(219, 219, 219); padding: 10px; margin: 0px;width:18.30808080808081%;"> <div><span style="color: rgb(255, 38, 0);">पदच्छेद - </span></div> </td> <td style="border: 1px solid rgb(219, 219, 219); padding: 10px; margin: 0px;width:81.56565656565657%;"> <div style="font-family: 'Sanskrit 2003';" lang="hi-IN" xml:lang="hi-IN"><br/></div> </td> </tr> <tr> <td style="border-style:solid;border-width:1px;border-color:rgb(219,219,219);padding:10px;margin:0px;width:50%;"> <div><span style="color: rgb(255, 38, 0);">समास - </span></div> </td> <td style="border-style:solid;border-width:1px;border-color:rgb(219,219,219);padding:10px;margin:0px;width:50%;"> <div style="font-family: 'Sanskrit 2003';" lang="hi-IN" xml:lang="hi-IN"><br/></div> </td> </tr> <tr> <td style="border-style:solid;border-width:1px;border-color:rgb(219,219,219);padding:10px;margin:0px;width:50%;"> <div><span style="color: rgb(255, 38, 0);">अनुवृत्ति - </span></div> </td> <td style="border-style:solid;border-width:1px;border-color:rgb(219,219,219);padding:10px;margin:0px;width:50%;"> <div><br/></div> </td> </tr> <tr> <td style="border-style:solid;border-width:1px;border-color:rgb(219,219,219);padding:10px;margin:0px;width:50%;"> <div><span style="color: rgb(255, 38, 0);">वाक्ययोजना - </span></div> </td> <td style="border-style:solid;border-width:1px;border-color:rgb(219,219,219);padding:10px;margin:0px;width:50%;"> <div><br/></div> </td> </tr> <tr> <td style="border-style:solid;border-width:1px;border-color:rgb(219,219,219);padding:10px;margin:0px;width:50%;"> <div><span style="color: rgb(255, 38, 0);">अर्थ - </span></div> </td> <td style="border-style:solid;border-width:1px;border-color:rgb(219,219,219);padding:10px;margin:0px;width:50%;"> <div><br/></div> </td> </tr> <tr> <td style="border-style:solid;border-width:1px;border-color:rgb(219,219,219);padding:10px;margin:0px;width:50%;"> <div><span style="color: rgb(255, 38, 0);">हिन्दी अर्थ - </span></div> </td> <td style="border-style:solid;border-width:1px;border-color:rgb(219,219,219);padding:10px;margin:0px;width:50%;"> <div><br/></div> </td> </tr> <tr> <td style="border-style:solid;border-width:1px;border-color:rgb(219,219,219);padding:10px;margin:0px;width:50%;"> <div><span style="color: rgb(255, 38, 0);">उदाहरण - </span></div> </td> <td style="border-style:solid;border-width:1px;border-color:rgb(219,219,219);padding:10px;margin:0px;width:50%;"> <div><br/></div> </td> </tr> </table> <div><br/></div> </en-note> ]]></content><created>20150626T091043Z</created><updated>20150627T003824Z</updated><tag>Adhyaya 01 Pada 01</tag><note-attributes><author>chemie1998@icloud.com</author><source>desktop.mac</source><reminder-order>0</reminder-order></note-attributes></note> </en-export>
Level 5* gazumped 12,222 Posted June 28, 2015 Level 5* Posted June 28, 2015 Hi. As a matter of interest, what's the original format of your source material for these files? Are you importing from Excel or PDF or what?
chemie 17 Posted June 28, 2015 Author Posted June 28, 2015 source format was enex file, I exported xml text from excel text with .enex extension. Is this the wrong way to handle this?
SebR 146 Posted June 28, 2015 Posted June 28, 2015 He means the first source. Where are your originale data's? Did you think about import folders?
chemie 17 Posted June 28, 2015 Author Posted June 28, 2015 I am sorry I could not understand. the first source came from the first template I created in Mac Evernote. Where I set the desired tables, headers.I exported this first note, and for later notes edited xml file created by evernote.
SebR 146 Posted June 28, 2015 Posted June 28, 2015 The content (sanskrit text I guess) of the notes you want to create, where is it? In a excel file, in a text file...?
chemie 17 Posted June 28, 2015 Author Posted June 28, 2015 I am sorry - that text is available in excel file
chemie 17 Posted June 28, 2015 Author Posted June 28, 2015 No I do not have any idea about EN import folders and I don't know how I can import data straight from excel to evernote where each row has information to be formatted as shown below text. I tried to paste the note as it appears in my evernote and it removed the table formatting, but this below info gives a good idea of what I am trying to achieve.In excel - read text is table header, text in front of red text keeps changing for each note. In evernote the header appears on first column and text on the right column in a two column 7 row table. उपदेशेजननुनासिक इत्। १.३.२ पदच्छेद - उपदेशे अ०पुं०७/१ अच् च०पुं०१/१ अनुनासिक:अ०पुं० १/१ इत् त०पु०१/१ समास - -na- अनुवृत्ति - -na- वाक्ययोजना - उपदेशे अनुनासिक: अच् इत् । अर्थ - उपदेशे अनुनासिक: अच् इत् भवति । हिन्दी अर्थ - उपदेश मे अनुनासिक अच् इत् होता है । उदाहरण - समस्त धातु जिनमे अनुनासिक अच् पढा हुआ है ।
SebR 146 Posted June 28, 2015 Posted June 28, 2015 OK, I didn't understand you absolutely want to have table and text formatting. In this case import folders can't help.There is probably an error in the script, a missed copy /paste when you copied the enex structure. I don't check your code accurately but are you sure a > isn't missing after CDATA for example?
Level 5* JMichaelTX 4,119 Posted June 28, 2015 Level 5* Posted June 28, 2015 I am learning a language and that requires creation of 4000 notes, that's a lot of copy and pasting and importing evernote files.instead this what I did,I created a template Exported as enex file, Opened enex file in excel and found the places that needs to be changed. VBA macro to change cell value export back to enex file Try to import back to Evernote.The last step is where I am stuck. I looked through the xml file for file I imported and file I created using Excel/VBAthey both look same.But when I import I am getting this message "Could not import notes, Error: INVALID_UTF8_DATA (Error in line 1, token"C:\Users\MyPC\Desktop\text01_01_001.enex") You might try saving the Excel file as a HTML file, then import that file into Evernote.If that still gives you trouble, then try creating the format you want in Excel without using anything from the ENEX file. Also, I have found that MS Word tables seem to work better in Evernote than Excel tables.If you can easily get the content you want into Word, you might try that, saving the Word file as a HTML file.
chemie 17 Posted June 29, 2015 Author Posted June 29, 2015 I was using filesystemobject to write to notepad and that did not work. I have unicode characters as well so this created some porting issues for me.Dim fso As FileSystemObjectDim txtStrm As TextStreamSet fso = New FileSystemObjectfso.CreateTextFile(strFile, Overwrite:=True, Unicode:=True).WriteLine strange After reading a bit I changed it to createobject ADODB sysytem and it worked fine, no issues. Dim objStreamSet objStream = CreateObject("ADODB.Stream")objStream.Charset = "utf-8"objStream.Open its good to see a message - "your note was successfully imported into evernote."
Recommended Posts
Archived
This topic is now archived and is closed to further replies.