ms-office

Reading Excel data and cell formatting in C#

痞子三分冷 提交于 2019-12-23 01:20:06
问题 I am looking for a library that allows me to read an Excel document in C#, but I am needing to be able to read the cell formatting as well as the data in the spreadsheet. I found this useful question that lists a lot of different alternatives for reading Excel documents, but a lot of the solutions offered here only allow the content of the spreadsheet to be read, not the cell properties (eg font, background colour, etc). For my particular problem, though, I am needing to read a document that

Adding to registry without manifest in MS Office AddIn

谁说我不能喝 提交于 2019-12-23 01:16:23
问题 I am making a Outlook 2007 AddIn in c#. So while making the setup file I need to modify the registry entries. One of them is is "Manifest" string which has the link to the AddIn's manifest file. By loading this the office application loads the AddIn. But When I looked at the WebEx registry entries it doesnot have any Manifest link. Why is it so? How did WebEx manage to do with out having a Manifest link? 回答1: There are (2) types of Outlook Add-ins - COM Add-ins and Exchange Client Extensions.

Reading Data From Excel SpreadSheet - Cannot perform runtime binding on a null reference

六眼飞鱼酱① 提交于 2019-12-22 17:56:03
问题 I have the code below to read data from an excel file, the problem I am running into is that when I try to read the range data, I get an exception "Cannot perform runtime binding on a null reference" on this line if (Int32.TryParse(xlRange.Cells[1, 4].Value2.ToString(), out value)) What I want to know is how I do access the information in the range properly please. Thanks in advance void ReadFromExcelToGrid2(String fileNameString) { try { Microsoft.Office.Interop.Excel.Application xlApp = new

Why a file starting with ~$ is created when opening a word document?

纵然是瞬间 提交于 2019-12-22 12:53:19
问题 We all might have noticed the creation of a file named "~$filename.docx" (hidden) when opening filename.docx using MS Word What is the purpose of this file? Why is it created and what does it contain? 回答1: It maintains temporary information about the current state of the document. Have you ever encountered a crash and when you open Word it asks you to recover certain documents that were being edited? That's where it gets that information. 来源: https://stackoverflow.com/questions/28950333/why-a

Excel VBA Workbook.ChangeFileAccess

风格不统一 提交于 2019-12-22 12:48:11
问题 I'm having trouble with changing the file access mode on Excel workbooks using VBA. I am using Office 2010. I want to be able to alternate between read only and read write mode as appropriate. However it seems changing a workbook from read/write to read only and then back again as in the code below causes an automation error when trying to access any member of the workbook object. Public Sub example() Dim w As Workbook 'open workbook with write access Set w = Workbooks.Open("example.xlsx",

Office Add-in development: Insert table in Word 2016

五迷三道 提交于 2019-12-22 11:27:46
问题 I am trying to insert a table using Office.js inside the body of a document but to no avail. I have used the following code: function insertSampleTable() { showNotification("Insert Table", "Inserting table...") Word.run(function (context) { // Create a proxy object for the document body. var body = context.document.body; body.insertTable(2, 2, Word.InsertLocation.end, ["a"]); // Synchronize the document state by executing the queued commands, and return a promise to indicate task completion.

VSTO 2012: backward compatibility

匆匆过客 提交于 2019-12-22 10:35:30
问题 Since lately the Visual Studio Tools For Office 2012 (VSTO 2012) are available for download. Can this new version still used for developing Add-In solutions for older Office versions (2007,2010)? Are there any advantages over VSTO 4.0 (besides Office 2013 support) 回答1: Yes, it can. I'm using VS2012 for an Excel 2007 project and it works fine. The trick is to change the debug path in your project file so that VS uses the older version of the Office app your plugin is for. Create your VSTO

MS OFFICE C#: Primary Interop Assemblies

给你一囗甜甜゛ 提交于 2019-12-22 09:59:14
问题 Any one know of a way to install MS Office Primary Interop Assemblies without installing having to install office itself? 回答1: Nope, not possible, or useful. There is no sense installing libraries designed so you can interoperate with Office, if there is no Office to interoperate with. (Note, you need a full licence for whatever office product you are using trough Interop too). 回答2: The use of this would be for setting up an automated build machine for continuous integration purposes. 回答3:

IRibbonExtensibility GetCustomUI not called

爷,独闯天下 提交于 2019-12-22 09:20:09
问题 I'm developing a shared add-in for Outlook. One of my customers is experiencing trouble on his machine, he does not see my add-in buttons/ui in the main window ribbon. After exploring his environment and my logs I noticed that the function "GetCustomUI" of interface IRibbonExtensibility is not being called in his environment. I'm not sure what can be the cause for the different behavior, why doesn't Outlook call the GetCustomUI on the customer machine? Also - Is it possible to initiate a call

Office Add-In Development - Malformed GET URL (_host_Info=…)

倾然丶 夕夏残阳落幕 提交于 2019-12-22 06:31:36
问题 I am currently developing a MS Word Office Addin using the JavaScript interface provided by Microsoft. I made a test implementation using a Django backend, where everything worked fine. However for the final product I have to integrate functionality with an existing Java Backend that runs in multiple configurations, which are out of my control. Consisting of Vaadin for the UI and mostly Tomcat (but not always) as a Servlet Container. I've run into the problem that the IFrame that runs inside