Tag: export

在HTML中将HTML内容写入Word文档时出现问题

我试图将HTML页面内容导出到Word。 我的Html显示页面是: 你最喜欢的颜色是什么? NA 列出前三名的学校? 一个国家两个开发三PS 还有一个点击事件按钮。 按钮单击事件将打开MS word并将页面内容粘贴到word中。 单词页面包含html设计页面的表属性。 它仅在Word 2003中出现。但在word 2007中,word文档包含带有out属性的文本。 如何在word 2003中删除此表属性。 我无法添加快照。 否则我会告诉你。 我正在通过aspx设计网页。 我通过以下代码导出网页内容。 protected void Button1_Click(object sender, EventArgs e) { Response.ContentEncoding = System.Text.Encoding.UTF7; System.Text.StringBuilder SB = new System.Text.StringBuilder(); System.IO.StringWriter SW = new System.IO.StringWriter(); System.Web.UI.HtmlTextWriter htmlTW = new System.Web.UI.HtmlTextWriter(SW); tbl.RenderControl(htmlTW); string strBody = “” + “” + “” + htmlTW.InnerWriter.ToString() […]

C#用分号导出CSV文件

我想将Excel文件转换为csv,我写了这个C#代码: Excel.Application excelApp = new Excel.ApplicationClass(); Excel.Workbooks workBooks = excelApp.Workbooks; excelApp.DisplayAlerts = false; Excel.Workbook workBook = workBooks.Open(sourceFile, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, ‘;’, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing); workBook.SaveAs(csvFilePath, Excel.XlFileFormat.xlCSV, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Excel.XlSaveAsAccessMode.xlNoChange, Type.Missing, Type.Missing, Type.Missing, Type.Missing, Type.Missing); workBook.Close(false, sourceFile, null); excelApp.DisplayAlerts = true; Excel.Application app = excelApp.Application; app.Quit(); Marshal.ReleaseComObject(workBooks); […]

c#ReportViewer Export

在ReportView我想导出为以下格式:.docx,.pdf或.xlsx 导出到.pdf: reportViewer.ExportDialog(_reportViewer.LocalReport.ListRenderingExtensions()[3]); 导出到.docx: reportViewer.ExportDialog(_reportViewer.LocalReport.ListRenderingExtensions()[5]); 导出到.xlsx: reportViewer.ExportDialog(_reportViewer.LocalReport.ListRenderingExtensions()[1]); 但首先我必须选择一种保存格式。 我想首先打开SaveFileDialog并在其中选择一种保存格式 我该怎么做 ?

Lotus Notes – 保存整个电子邮件eml c#

我需要导出(保存到)硬盘我的Lotus Notes电子邮件。 我想出了如何将附件保存到硬盘驱动器的方法,但我无法弄清楚如何保存整个电子邮件的方式。 下面的代码显示了我如何导出附件。 你能建议我如何修改它来保存电子邮件? PS-我是编程新手。 using System; using System.Collections.Generic; using System.Linq; using System.Text; using Domino; using System.Collections; namespace ExportLotusAttachments { class Class1 { public void ScanForEmails() { String textBox1 = “c:\\1”; NotesSession session = new NotesSession(); session.Initialize(“”); NotesDbDirectory dir = null; dir = session.GetDbDirectory(“”); NotesDatabase db = null; db = dir.OpenMailDatabase(); NotesDatabase NDb = […]

C#涉及多个项目时的非托管出口(Robert Giesecke)

我有这种情况,我需要在.Net中创建一个可以从delphi程序调用的非托管DLL。 我一直在做一些研究,我找到了Robert Giesecke的图书馆(RGiesecke.DllExport)。 我从一个非常简单的DLL开始,它显示一个带有文本框的窗体,如下所示: [ComVisible(true)] [DllExport(“PlaceOrder”, CallingConvention = CallingConvention.StdCall)] public static IntPtr PlaceOrder(IntPtr lnpInXml) { string inputXml = Marshal.PtrToStringAnsi(lnpInXml); StringBuilder sbOutputXml = new StringBuilder(); Form1 pti = new Form1(inputXml, sbOutputXml); pti.ShowDialog(); return Marshal.StringToHGlobalAnsi(sbOutputXml.ToString()); } 这工作正常,我设置delphi程序来调用我的DLL,它工作得很好。 当我在我的解决方案中添加对另一个项目的引用并在该项目中创建对象的实例时,问题就出现了。 此时,delphi程序停止显示表单,就像它找不到导出的函数但它不会抛出任何错误: using MyCommonCode; namespace UnmanagedDLLTest { [ComVisible(true)] public static class UnmanagedDLL { [ComVisible(true)] [DllExport(“PlaceOrder”, CallingConvention = CallingConvention.StdCall)] public static […]

自定义’ExportFactory’

使用MEF的桌面应用程序导入许多“ServiceProviders”。 每个部分(ServiceProvider)都是一个单独的DLL内的类。 所有DLL都在“插件”文件夹中,供桌面应用程序使用。 由于我需要新部件的实例,因此ExportFactory是最佳选择。 问题是我的部件有构造函数。 我需要将一些参数传递给ExportFactory (MEF2,Preview2)不支持的部件的构造函数。 我需要这样的东西: // Each part has its own dependency Dependency dependency = LoadDependency(myPart.Metedata[“Name”]); // Injecting dependency into part’s constructor myPart.CreateExport(dependency); 我不想从我的零件方面导入任何东西。 可以在此处找到示例项目(带无参数构造函数)。

从C#类库导出函数

如何导出在C#类库中定义的函数,同时允许它们导入到非托管C ++应用程序/ DLL并从中调用?

快速C ++程序,C#GUI,可能吗?

我正在研究开发一种应用程序,它将以每秒约2000行(帧)的速度处理来自线扫描相机的数据。 对于这个实时应用程序,我觉得C / C ++是要走的路。 (这是我的感觉,其他人会同意托管代码不适合这项任务。) 但是,我做了很少的MFC或任何其他C ++ GUI。 不过,我真的很想做C#GUI。 所以我很自然地用C / C ++编写数据密集型代码,用C#编写GUI。 GUI将用于设置/校准/在线监控(并可能通过UDP输出数据,因为它在C#中更容易。 首先,我想看看是否有人同意这是可行的方法。 根据我的编程经验(擅长低级C算法和高级C#GUI设计),它感觉恰到好处。 其次,我不确定正确的方法。 我只是在VS2005中汇总了一个解决方案,该解决方案从C#app调用了一些(extern“C”)DLL函数。 为了确保我能做到,我写了DLL中的一些全局变量,并从中读取: test.h int globaldata; extern “C” __declspec(dllexport) void set(int); extern “C” __declspec(dllexport) int get(); TEST.CPP extern int data=0; __declspec(dllexport) void set(int num) { data = num; } __declspec(dllexport) int get() { return data; } test.cs中 [DllImport(“test”)] […]

我怎样才能创建schema.ini文件? 我需要将.csv文件导出到datagridview

我想将CSV文件导出到datagridview。 我需要创建文件schema.ini 。 但我不知道,我怎么能创造它? 有我的代码: public DataTable exceldenAl(string excelFile) { try { string fileName = Path.GetFileName(excelFile); string pathOnly = Path.GetDirectoryName(excelFile); string cmd = “Select * From [” + fileName + “$]”; string cnstr = “Provider=Microsoft.ACE.OLEDB.12.0;Data Source=” + pathOnly + “\\;Extended Properties=\”Text;HDR=Yes;FORMAT=Delimited\””; OleDbConnection ocn = new OleDbConnection(cnstr); ocn.Open(); OleDbCommand command = new OleDbCommand(cmd,ocn); OleDbDataAdapter adap = […]

如何从Powerpoint 2010导出电影?

如何使用MS Office PIA(主互操作程序集)或其他方式以编程方式将嵌入式video从powerpoint 2010导出到外部文件? 在演示文稿中嵌入video是Powerpoint 2010中的一项新function,我无法找到解决方案。