ms-office

How do I construct typed constants for the OneNote COM API in python?

瘦欲@ 提交于 2019-12-24 14:11:56
问题 I want to use the UpdatePageContent COM method documentation via the python win32com module. Things I can do so far include getting the hierarchy, getting page contents, etc. I can even validly manipulate the XML to prepare changes (tested using the MATLAB COM interface). This is a minimal example of what I am trying to do: import win32com from bs4 import BeautifulSoup oneNoteApp = win32com.client.Dispatch('OneNote.Application') pageID = '{603BD3F0-4DAB-4E5B-8E28-28CA0F2B0C83}{1}{B0}' # from

Why am I getting an illegal value error using PpShapeFormat in Office 2013 Interop

孤人 提交于 2019-12-24 13:19:32
问题 I wrote an MS JScript utility (for use in SmartBear's TestComplete) that exports images that are embedded in a Word document to PNG files on disk. When I run this utility on Win7, with Office 2010, everything works fine. But when I run it on Win8 with Office 2013, I get an "illegal value" error when passing the PpShapeFormat filter to the Export method. Here's the relevant portion of my script: //get the list of shapes from the word doc, and how many there are var iShapeList = DocObj

Accessing a table in an excel spreadsheet using C#

∥☆過路亽.° 提交于 2019-12-24 12:44:34
问题 I'm writing a program (in C#, using Microsoft.Office.Interop.Excel) that reads in an Excel spreadsheet and applies filters, etc. to the data within. However, I'm struggling with a few issues, namely how to "get" a table object representing the table of data I am working with. I'd like to be able to access columns by their headers as well, so I assumed that I would require the DataTable namespace. I can't seem to figure out what to do, however. Here is the rough framework of my code: private

Excel.Application.SelectionChange fires only once

放肆的年华 提交于 2019-12-24 09:47:59
问题 I'm getting only the first event notification, and nothing happens after. Any ideas? UPD: I've found a strange thing. My code for event handler looked like this: var cell = range.Cells[1, 1]; var rangeName = cell.Address[false, false, XlReferenceStyle.xlA1, Type.Missing, Type.Missing]; I've changed it in this way, adding explicit type cast: var cell = (Range)range.Cells[1, 1]; var rangeName = cell.Address[false, false, XlReferenceStyle.xlA1, Type.Missing, Type.Missing]; And now my event

How to convert RTF to HTML

情到浓时终转凉″ 提交于 2019-12-24 08:55:25
问题 Could you please tell me if there is a good free C++ class/library to convert RTF to HTML? Thank you! 回答1: I would use Word Automation (i.e. integrate with Microsoft Office). Then, through the MS Word class, open the RTF, save it as HTML. Open rtf file. SaveAs using WdSaveFormat = wdFormatHTML http://msdn.microsoft.com/en-US/library/microsoft.office.tools.word.document.saveas(v=VS.100).aspx 来源: https://stackoverflow.com/questions/8199129/how-to-convert-rtf-to-html

Office365 Excel access to the Tools -> References menu for RegExp library

人走茶凉 提交于 2019-12-24 08:23:59
问题 This might sound like a simple question but I'm creating a macro in VBA that uses regular expressions. It turns out VBA doesn't inherently support regex and I need to add a reference to 'Microsoft VBScript Regular Expressions 5.5' to gain access to regex functions in Excel. All my searching online tells me you need to go to Tools -> References menu to add/remove references that can be used in VBA. The Tools -> References menu in Excel as obtained from Google For the life of me I can't see

Embed a UserVoice widget in an add-in in Excel for Windows

假如想象 提交于 2019-12-24 07:22:26
问题 (* I clean up the initial thread *) I want to add the UserVoice widget to one Excel add-in. I have made the following example code: <!DOCTYPE html> <html> <head> <script src="https://appsforoffice.microsoft.com/lib/1/hosted/office.js"></script> <link rel="stylesheet" href="https://appsforoffice.microsoft.com/fabric/1.0/fabric.min.css"> <link rel="stylesheet" href="https://appsforoffice.microsoft.com/fabric/1.0/fabric.components.min.css"> </head> <body> <div id="contact_us">Contact us</div> <

Application.ActiveWorkbook is null in Excel Addin

浪尽此生 提交于 2019-12-24 05:40:11
问题 I am writing an Excel Add-in. Following is my code private void ThisAddInStartup(object sender, EventArgs e) { Excel.Sheets sheets = Application.ActiveWorkbook.Sheets; _worksheet = (from Excel.Worksheet sheet in sheets where sheet.Name.Contains(SheetName) select sheet).FirstOrDefault(); Application.SheetChange += ApplicationSheetChange; } When I debug, everything works great. But When I open an excel file directly from my hard drive then I am getting Application.ActiveWorkbook as null . Can

How do I read Word, Excell, and PDF docs in PHP?

孤人 提交于 2019-12-24 02:54:07
问题 I need to be able to read the text of many different file types in PHP, including .doc, .docx, excel, and PDF files. I found a few methods online that require installing multiple packages but I was wondering if there was a better way to do this? 回答1: No matter which way you swing it, there is no way to kill all these birds with one stone. Word Thread: Reading/Writing a MS Word file in PHP Excel Thread: Reading an Excel file in PHP PDF Thread: Read pdf files with php 回答2: office 2007 is very

Poor response times office 365 REST API

妖精的绣舞 提交于 2019-12-24 01:38:26
问题 I'm using the new office REST APIs in order to access Exchange data, the APIs are behaving as expected however the response times of the requests are hugely variable. Below are the times recorder over 30 requests with a 10 second interval between each (all requests return the same data): I: Polling request time: 33428ms I: Polling request time: 35979ms I: Polling request time: 5247ms I: Polling request time: 28293ms I: Polling request time: 5362ms I: Polling request time: 5556ms I: Polling