export-to-word

C# Export Excel Chart as object (not as picture) to Word

喜欢而已 提交于 2020-01-03 17:46:29
问题 I want to export an excel chart to Word as an object (Excel Chart), not as a picture. As picture is very easy with Chart.CopyPicture I´m using AddOleObject, but it gives an error about not being able to link the file. This is the code: Document doc; // Existing document string chartSheet = xlsFilePath + "!" + chartSheetName; string type = "Excel.Chart.8"; InlineShape shape = doc.Content.InlineShapes.AddOLEObject(ClassType: type, FileName: chartSheet, LinkToFile: false, DisplayAsIcon: false);

Export to word with a filename doesn't seem to work

别等时光非礼了梦想. 提交于 2019-12-13 00:10:22
问题 I export a datatable to word, when I pass a file name it doesn't seem to get the file name in Open/Save dialog box. Here is what I am doing public static void Convertword(DataTable dt, HttpResponse Response,string filename) { try { Response.Clear(); Response.AddHeader("content-disposition", "attachment;filename=" + filename + ".doc"); Response.Charset = ""; Response.Cache.SetCacheability(HttpCacheability.NoCache); Response.ContentType = "application/vnd.word"; System.IO.StringWriter

Exporting data from c# to word document

ぃ、小莉子 提交于 2019-12-12 05:31:20
问题 I have a grid in c# filled with data. One of the columns in that grid contains letters (followed by numbers) sorted alphabetically, like this: A124 A256 A756 B463 B978 D322 etc. I need to export this data in a word document (.doc or .docx format). This is what i did to export a signle grid: var dt = FuntionThatReturnsDatatables(); var gd = new GridView { DataSource = dt }; gd.DataBind(); HttpContext.Current.Response.Clear(); HttpContext.Current.Response.Buffer = true; HttpContext.Current

SSRS 2008 Export to Microsoft Word does not include headers and footers

六眼飞鱼酱① 提交于 2019-12-10 15:48:19
问题 I have a report, which was recently converted from SSRS2005 to SSRS2208. The report header has a background, which is calculated depending on the page number. In the report footer there is an image and two text boxes, also calculated depending on page number. The report preview in the Business Intelligence Development Studio displays correctly, exporting to PDF also works correctly. However, when exporting to Microsoft Word the header and footers disappear and page margins increase by about 1

Why is font extension working only for PDF but not for other formats (HTML, XLS, DOC)?

旧巷老猫 提交于 2019-12-07 07:13:23
问题 Through Jaspersoft Studio we exported the built-in Windows Calibri font variants for use in a webapp into a font extension JAR, using the following settings: The directory structure within the exported jrfontextensions.jar is as follows: --jrfontextensions --jasperreports_extension.properties --fonts --fontsfamily1505796949749.xml --Custom_Font --calibri.ttf --calibrib.ttf --calibrii.ttf --calibriz.ttf Contents of jasperreports_extension.properties: net.sf.jasperreports.extension.registry

SSRS 2008 word export doesn't print to landscape

北城以北 提交于 2019-12-02 08:37:05
问题 I have a number of SSRS 2008 reports that need to be exported to word in landscape mode. The reports look great when exported but when you attempt to print (or even preview) the page Word appears to be trying to print the reports in portrait mode thus cutting off all content to that is more then 8.5" from the leftmost side of the page. I have ensured that the following settings have been made. 1) Report -> Report Properties -> Landscape is set 2) the paper size is 11" wide X 8.5" high. 3) the