Get content from several Pages and Sections from OneNote to Excel - excel

I am very new to all of this so please bare with me.
I have a OneNote Notebook with several Sections each containing hundreds of pages.
I need to retrieve all the content of the pages (while keeping the structure of the page titles / section titles) and end up with that content in a somewhat usable state in Excel. Of course, doing so manually will take me weeks. That's why I'm looking for an automated/semi-automated approach.
Is there a way to do that? What do I need to look into? I haven't found an answer on the interned but I guess I may need to use the OneNote API? Maybe find a way to export the OneNote content into .csv to then process it in Excel? Maybe the OneNote content can be retrieved directly by a macro in Excel?
What would you look into to achieve my goal?
Thank you for reading.

The OneNote API/Graph API can get sections and pages
GET https://graph.microsoft.com/v1.0/me/onenote/notebooks/{id}/sections
GET https://graph.microsoft.com/v1.0/me/onenote/sections/{id}/pages$count=true&$top=100
There may be a limitation to the number of pages that can be accessed by the API (recently introduced?). Then a further call to get individual page content:
GET https://graph.microsoft.com/v1.0/me/onenote/pages/{id}/content[?includeIDs=true]
An alternative may be to use this rust OneNote notebook parser - creates html files.

Related

Possible to publish OneNote content to the web?

I have a notebook full of content I am looking to publish online, but the problem I am running into is I can't find a method that will retain the original formatting. I understand I might have to recreate the navigational tabs/pages, but I trying to avoid having to recreate the content in a different format.
Is there anyway to export a form of the content that maintains the tables, text formatting and etc.?
Why not get a read only sharing link to your notebook?
I think the closest thing to what you want is this:
https://thenextweb.com/apps/2015/05/22/microsofts-new-wordpress-plugin-lets-you-directly-publish-your-onenote-documents/#.tnw_o7KuyR9D

How do I search attached files stored in a MS Access 2010 database?

How do I search in MS Access (ver 2010) for data in files attached to records? If I do a "Find" and specify text I KNOW is in an attached txt file to a particular record, there are no hits. While if I have the same data in a Text Field or Memo field, Access finds it. I understood from one of the Access help screens I found that it is possible to search attachments from within Access, but I have not been able to do this yet.
BTW, I did try using the query tool and searching for text I knew was in the attachment, but it was not successful, although it did find the same text within a memo field in another record.
Thx,
jmb
I'm fairly certain that there is no mechanism in Access to find records based on text within a file attachment. A bit of web searching found an earlier question here and the responses seem to agree that there isn't.
One reference from Microsoft here says
By using attachments, you open documents and other non-image files in their parent programs, so from within Access, you can search and edit those files.
but I think that statement could be misinterpreted. I believe what they meant to say was that
"...from within Access you can open an attachment in its parent program and then work on it as usual (e.g., edit it, search it, print it, and so on)."
You can use file system object, open the file as string and search sequentially. That's as close as you'll get

Embedding an image to a single Excel cell using Classic ASP - is such thing possible?

Short background - I'm exporting an Excel file using Classic ASP, in which I generate a table which is originated at an MS SQL database.
One of the columns I retrieve holds paths to images I have on my server. I use the following code to define an "Excel-targeted" response:
Response.ContentType="Application/vnd.ms-excel"
Response.AddHeader "content-disposition", "attachment; filename=""Sales_Report-"& Month(Date())&"-"& Day(Date())&"-"& Year(Date()) &"-"& ".xls"""
The problem - I've been googling for a solution and came to realize (correct me if I'm wrong here) that embedding it as "contents" of a single page is impossible.
However, it is possible to either placing the image in one cell's remark (I'd like to avoid that), or alternatively just set the image as a cell's background.
Important note - my goal is to have the images sort and filter with the rest of the row they're located in. I did manage to place the images exactly where they should be to begin with, but they just float as regular images in the spreadsheet.
I'm using plain HTML elements and not XML - but an XML solution (if exists) would also be awesome.
Thanks.
OK, so after some research I've come to discover the research I was lacking to begin with. It obviously depends on the MS Excel version which eventually opens the generated file.
Generating XLS files with advanced cell settings is quite doable and intuitive when one acquires better understanding of the XML structures which help generating files through the code, with either Classic ASP & ASP.NET code behind.

Exporting data to existing Excel file

I have a system with an Excel spreadsheet template file which is used for invoicing. I would like the user to be able to click a button on an Xpage, which will then open the spreadsheet and enter the latest invoicing data in Excel. I don't mind if Excel is either the application on their machine or on the server, but my preference would be the application locally on their machine.
I've looked into Xagents, as I feel this is probably the answer. I know they can be used to create Excel but I have not been able to locate any mention of opening an Excel file, and entering data into specific cells.
Is this possible?
EDIT: you can use Apache POI for editing and creating Microsoft Office documents. This is a java project which gives you a handle to office documents and this can be used using java.
A good starting point can be the blog of Christian Guedemann from webgate:
http://guedebyte.wordpress.com/2012/09/17/documents-and-spreadsheets-with-xpages-building-the-kernel-part-ii/
(end of edit)
The only way I KNOW and tried to write data from Notes to Excel is exporting the data to an HTML page and setting the Content Type accordingly (e. g. as described here (there are a lot more resources available for taht):
http://www.dominoguru.com/pages/developer2010_xpagexlsexport.html
I am not sure if this is of help but it seems that this project can help you:
http://www.openntf.org/internal/home.nsf/project.xsp?action=openDocument&name=ZK%20Spreadsheet%20for%20XPages
As far as I can see this project can load Excel files from XPages - and then it should also be possible to edit the files.
Besides that the only solution I can think of is a Notes Agent that is called from the XPage. This agent can then run in background and do all the excel stuff. After running, the XPage can show a link to the Excel file. Actually this is the solution I would consider to implement - but maybe others step in with better answers here.
You don't want to introduce a dependency on Excel in your application -- wouldn't work with an iPad front-end. Rather have a look at the ZK Spreadsheet, it will fulfill your needs.
However if you have to have Excel, then you need a roundtrip solution: load the Excel from an URL (probably generated by an XAgent (?) and save it back. The saving back part is the tricky one. Normal HTTP doesn't allow that. What you need there is a webDAV capable server. Watch out for a project on OpenNTF soon (just clearing IBM legal) that provides webDAV.
However the ZK Spreadsheet looks much better for your needs.
I have a sample database at the following URL --> http://www.nnsu.com/nnsusite.nsf/%24%24OpenDominoDocument.xsp?documentId=B65507CB2DE15B3286257986005F061D&action=openDocument
Download the APCC.nsf. This will allow you to create/read a new EXCEL spreadsheet and then stream the resulting file to the requesting browser. There is not need to have EXCEL or office installed on the Server.
THe examples create a new workbook, but you can also store a "template" on the server or in a notes document and use it as a starting point and then save it to a document or stream it to the requesting browser.
With Apache POI you can read/write to a spreadsheet using data from the notes document the process is initiated from.

How do I import an Excel Spreadsheet into a blog..?

We are interested in trying to import an Excel spreadsheet into our Blog.
A sample of the Excel spreadsheet that we generate each day and want to export into our Blog is located at:
http://www.wallstreetsignals.com/WhatsWorking.html
Our Blog is located at:
http://whatsworkinginthestockmarket.blogspot.com/
We are interested in a program or method that would allow us to just import the Excel spreadsheet into our Blog instead of having to hand input all the data, which is what we are doing now.
Thank you for your thoughts and the cost to have you help accomplish our goal.
Philip
WallStreetSignals.com
Well, outside of creating a program (which is possible, using PHP, Perl, Java, etc and either an excel input module or converting to CSV or XML and processing that)...
Have you considered using Google Documents or another online spreadsheet software? It's easy to import an excel spreadsheet, and then embed the spreadsheet in the blog post or webpage. Then if you need to change it, modify the google document spreadsheet and the changes are rendered on the webpage or blog post immediately.
-Adam
The easiest thing might be to use Google Docs. Upload your spreadsheet, then publish from Google Docs to your blog. See this article.
Can your blog consume XML? You can set up an XML Schema in Excel 2007 and just export it to an XML file. You would need to write an XSLT.
I also have a macro that will write out XML to a file... can upload that if it would help...
If your spreadsheet is generated by a macro, you could just modify a macro to generate html or some other sort of blog markup ready for copy and paste.
Excel can save as HTML, which you could then strip the metadata from and use in your website. Unfortunately the HTML that it generates is very bloated. If you do not mind client lock-in, you could consider embedding the XLS file directly on your website, and having your viewers use the IE embedded excel viewer.
If you can use ASP.NET you could use SpreadsheetGear for .NET to load an Excel workbook, grab values, formatted values or even images to display on a web page. There are live ASP.NET samples with source if you want to check it out.
Disclaimer: I work for SpreadsheetGear LLC

Resources