ms-office

How to produce documents (docx or pdf) from SQL Server?

假装没事ソ 提交于 2020-01-01 04:25:10
问题 I know this is a little subjective, but I'm looking into the following situation: I need to produce a number of documents automatically from data in a SQL Server database. There will be an MVC3 app sat on the database to allow data entry etc. and (probably) a "Go" button to produce the documents. There needs to be some business logic about how these documents are created, named and stored (e.g. "Parent" documents get one name and go in one folder, "Child" documents get a computed name and go

A copy of Excel Addin is created in My Documents after saving

徘徊边缘 提交于 2019-12-31 07:41:39
问题 I have an application (running in IBM Notes, using Lotusscript etc.) that create a new Excel object via OLE automation. In my app I create a new Workbook and saving it to a temporary folder (I am saving it as Excel Worksheet w/o macros -> type 52) so that the resuting file is sth. like that: tmp_abc1234.xlsx Then I open the file in Excel programmatically. I have an Excel Addin (filename is "Teamoffice.xlam" loaded where some macros reside I will trigger in the custom save actionbar button. In

Forcing the browser to download a docx file in JAVA generates a corrupted document

房东的猫 提交于 2019-12-31 04:40:07
问题 Using JAVA, I'm trying to force the browser to download files. Here is the code I currently use: response.reset(); response.resetBuffer(); response.setContentType(mimeType); response.setHeader("Content-Disposition", "attachment; filename=\"" + fileName + "\""); InputStream in = new FileInputStream(file); OutputStream out = response.getOutputStream(); IOUtils.copy(in, out); out.flush(); out.close(); in.close(); response.flushBuffer(); It works almost well, but when forcing the download of a

Warning: The referenced component 'Microsoft.Office.Core' could not be found

走远了吗. 提交于 2019-12-30 16:25:10
问题 When building one of my projects, I'm getting the following warnings: Warning 3 Cannot find wrapper assembly for type library "Microsoft.Office.Core". Warning 4 The referenced component 'Microsoft.Office.Core' could not be found. Strangely, the build fails with no errors. The warnings above seem to be the problem. This started happening after I installed some Office 2007 updates from Windows Update. Before that it was building everything fine. Has anyone experienced the same issue? Any ideas

Calculation fields not working with dates

最后都变了- 提交于 2019-12-30 11:34:17
问题 I have seen quite a lot of examples looking for a solution, so I'm pretty certain that this possible. I have Custom Document Properties (properly defined as date) containing dates , and I want to make operations on them : {={ DOCPROPERTY DateFieldTest }+1 \@"d MMMM YYYY"} 'toggle DOCPROPERTY Field {=07/04/2016+1 \@"d MMMM YYYY"} 'toggle calculation field 1 I have also tried : {=DATE(YEAR({ DOCPROPERTY DateFieldTest }),MONTH({ DOCPROPERTY DateFieldTest }),DAY({ DOCPROPERTY DateFieldTest })+1)

The Microsoft Office Access database engine could not find an object

孤人 提交于 2019-12-30 10:34:15
问题 I'm trying to copy data from excel to sql server but facing the following error. The Microsoft Office Access database engine could not find the object 'sheet1$'. Make sure the object exists and that you spell its name and the path name correctly. My code is: protected void importdatafromexcel(string filepath) { string sqltable = "PFDummyExcel"; string exceldataquery = "select EmployeeId,EmployeeName,Amount from [Sheet1$]"; string excelconnectionstring = @"Provider=Microsoft.ACE.OLEDB.12.0

.NET Interop: Find All instances of of a running COM object with C#

江枫思渺然 提交于 2019-12-30 07:03:08
问题 Background I am automating some Office application (Word and PowerPoint) via command-line tool. One thing my tool needs to do is locate all the running instances of Word. I know how to get a reference to one of the instances... Object running_obj = null; { running_obj = System.Runtime.InteropServices.Marshal.GetActiveObject(progid); } catch (System.Exception) { //failed to find the object; } if (running_obj!=null) { var running_obj_type = System.Type.GetTypeFromProgID(progid); Microsoft

How to develop a Microsoft Office AddIn without Visual Studio

若如初见. 提交于 2019-12-29 11:35:26
问题 I'm trying to develop an MS Office Addin in C# .Net and I don't have access to Visual Studio. Instead I'm using SharpDevelop as my IDE, (but my question is equally relevant to anyone developing using any other IDE or compiling from the command line...) I've done a bit of searching for guides on how to develop AddIns, but they all seem to require Visual Studio and follow these steps: Install the Interop Assemblies Create a Visual Studio .Net Project ( I'm unable to do this bit ) Extend the VS

Get user calendar using OutlookClient

笑着哭i 提交于 2019-12-29 09:33:52
问题 I'm using Outlook-SDK-Android (https://github.com/OfficeDev/Outlook-SDK-Android) to talk with Outlook Calendar REST API (https://msdn.microsoft.com/en-us/office/office365/api/calendar-rest-operations). So far I've been able to get the events on my own calendar using: import com.microsoft.services.outlook.fetchers.OutlookClient; OutlookClient mClient; ... mClient = new OutlookClient(outlookBaseUrl, mResolver); ... mClient.getMe() .getCalendarView() .addParameter("startDateTime", startDate)

how to make VBA code compatible for office 2010 - 64 bit version and older office versions

戏子无情 提交于 2019-12-29 04:55:06
问题 I have observed an issue with below function call when we migrated to office 2010-64 bit version. Private Declare Sub CopyMem Lib "kernel32" Alias "RtlMoveMemory" (Destination As Any, Source As Any, ByVal Length As Long) According to information available on http://msdn.microsoft.com/en-us/library/ee691831.aspx link. I have changed above call as below and it has been working fine on office 2010 64 bit version. Private Declare PtrSafe Sub CopyMem Lib "kernel32" Alias "RtlMoveMemory"