I am trying to automate a Powerpoint presentation. I am using OpenXML to navigate the powerpoint presentation up to the point that I find the Excel linked to a chart. Now I want to use EPPlus to load a datatable into one of the worksheets (because EPPlus has a simple LoadFromDataTable function whereas I think I would have to write lots of code to use OpenXML). So my problem is this. I have a
我正在尝试自动化Powerpoint演示文稿。 我使用OpenXML来导航PowerPoint演示文稿,直到我找到Excel链接到图表。 现在我想使用EPPlus将数据表加载到其中一个工作表中(因为EPPlus具有简单的LoadFromDataTable函数,而我认为我必须编写大量的代码才能使用OpenXML)。 所以我的问题是这样的。 我在内存中有一个PresentationDocument。 我已经导航到特定的图表,我想通过doc.PresentationPart.SlideParts.ElementAt(0).ChartP
I am using EPPlus to read data. This data consists of either a .xlsx or .csv . When the file is a .csv file I use the LoadFromText functionality. But EPPlus decides that it also has to parse all the values, which it shouldn't . For instance: Id;Double; 1;-3,88; ExcelTextFormat format = new ExcelTextFormat(); format.Delimiter = ';'; worksheet.Cells[1, 1].LoadFromText( "file", format );
我正在使用EPPlus来读取数据。 该数据由.xlsx或.csv 。 当文件是.csv文件时,我使用LoadFromText功能。 但EPPlus决定它也必须解析所有的值, 而不应该这样做 。 例如: Id;Double; 1;-3,88; ExcelTextFormat format = new ExcelTextFormat(); format.Delimiter = ';'; worksheet.Cells[1, 1].LoadFromText( "file", format ); 结果是工作表中的-3,88值变为: -388 。 我发现这是因为EPPlus将-3,88视为一个数字,并将其
Update: part of the problem is Excels fault. Its changing the image size between different view settings (normal layout vs page layout). I may have to re-evaluate, whether the remaining difference even matters... How can I add an image to an excel sheet via EPPlus without any resizing (open in Excel afterwards and have 100% scaling set in the image properties)? The image ( Testfile.jpg ) in
更新:部分问题是Excels故障。 它在不同的视图设置(普通布局vs页面布局)之间更改图像大小。 我可能不得不重新评估,剩下的差别是否重要... 如何通过EPPlus将图像添加到Excel表格中而无需调整大小(之后在Excel中打开,并在图像属性中设置了100%缩放比例)? 我测试用例中的图像( Testfile.jpg )是一个宽度为508px,高度为177px,分辨率为300 DPI的jpg。 我的测试代码: class Program { static void Main(strin
As an overview I am attempting to add Export() functionality to my application -- allowing the user to specify certain model fields and only export the values in those fields by querying with LINQ and using the EPPlus library to Export. I am attempting to implement Dynamic LINQ functionality in my MVC5/EF Code-First application based on THIS example, but seem to be missing some things to get it
作为一个概述,我试图将Export()功能添加到我的应用程序中 - 允许用户指定某些模型字段,并且只通过查询LINQ并使用EPPlus库导出来在这些字段中导出值。 我试图在基于这个示例的MVC5 / EF代码优先应用程序中实现动态LINQ功能,但似乎错过了一些让它工作或不理解的东西。 首先,我将一个新的类文件添加到名为DynamicLibrary.cs主项目文件夹中。 当我在这里下载.zip时,我“相信”我想要的代码是Dynamic.cs文件代码,我将代码复制
How to make columns to be auto width when texts in columns are long? I use this code Worksheet.Column(colIndex).AutoFitColumn() 'on all columns' Worksheet.cells.AutoFitColumns() Worksheet.Column(colIndex).BestFit = True 'on all columns' None of these methods are working Is there any ways to make it work? Note: Some of my texts use Unicode. Use AutoFitColumns , but you have to specif
当列中的文本很长时如何使列成为自动宽度? 我使用这个代码 Worksheet.Column(colIndex).AutoFitColumn() 'on all columns' Worksheet.cells.AutoFitColumns() Worksheet.Column(colIndex).BestFit = True 'on all columns' 这些方法都没有工作 有什么方法可以使它工作吗? 注意:我的一些文本使用Unicode。 使用AutoFitColumns ,但你必须指定单元格,我假设整个工作表: VB.NET Worksheet.Cells(Worksheet.Dim
I'm using the EPPlus library to read/write Excel files: http://epplus.codeplex.com/ I'm trying to simply merge some cells when writing a document: using (ExcelPackage pck = new ExcelPackage()) { //Create the worksheet ExcelWorksheet ws = pck.Workbook.Worksheets.Add("Demo"); //Format the header for column 1-3 using (ExcelRange rng = ws.Cells["A1:C1"]) { bool
我正在使用EPPlus库来读取/写入Excel文件:http://epplus.codeplex.com/ 我在编写文档时试图简单地合并一些单元格: using (ExcelPackage pck = new ExcelPackage()) { //Create the worksheet ExcelWorksheet ws = pck.Workbook.Worksheets.Add("Demo"); //Format the header for column 1-3 using (ExcelRange rng = ws.Cells["A1:C1"]) { bool merge = rng.Merge; } } 有一个名为Merge
I am trying to add the same image multiple times into an excel file using EPPlus. I am using the following code to do so: Image logo = Image.FromFile(path); ExcelPackage package = new ExcelPackage(info); var ws = package.Workbook.Worksheets.Add("Test Page"); for(int a = 0; a < 5; a++) { ws.Row(a*5).Height = 39.00D; var picture = ws.Drawings.AddPicture(a.ToString(), logo); picture
我试图用EPPlus多次将相同的图像添加到excel文件中。 我正在使用以下代码来执行此操作: Image logo = Image.FromFile(path); ExcelPackage package = new ExcelPackage(info); var ws = package.Workbook.Worksheets.Add("Test Page"); for(int a = 0; a < 5; a++) { ws.Row(a*5).Height = 39.00D; var picture = ws.Drawings.AddPicture(a.ToString(), logo); picture.SetPosition(a*5, 0, 2, 0); } 一切正
I am using ASP.NET MVC4 with Entity Framework 5 . Essentially every controller action result filters the db results by the logged in Users' Company ID . I have just begun implementing a repository pattern to return the models rather than directly filtering the DbContext from the controller. (Passing the companyID into the repository to filter results of methods) I have a funny feeling t
我正在使用实体框架5的 ASP.NET MVC4 。 基本上,每个控制器操作结果都通过登录的用户公司ID来过滤数据库结果 。 我刚刚开始实现一个存储库模式来返回模型,而不是直接从控制器过滤DbContext。 (将companyID传入存储库以过滤方法结果) 我有一个有趣的感觉,这样做是不好的做法,但一直没有找到任何关于这个问题的信息。 我将在下面插入我当前代码的基本版本,我很感激任何关于它是否是不好的练习的信息,以及为什么。
At the moment i'm facing an ridiculous problem which i'm not able to fix I wrote a little wrapper which wraps almost any Property and added one Property but i don't know how to pass the Validation through him to my XAML Here is my code XAML <TextBox Height="23" HorizontalAlignment="Left" Margin="42,74,0,0" Name="textBox2" VerticalAlignment="Top" Width="120" DataCon
目前我面临着一个我无法解决的荒谬问题 我写了一个小包装器,它包装了几乎任何属性并添加了一个属性,但我不知道如何将验证通过他传递给我的XAML 这是我的代码 XAML <TextBox Height="23" HorizontalAlignment="Left" Margin="42,74,0,0" Name="textBox2" VerticalAlignment="Top" Width="120" DataContext="{Binding TB2}"/> <!-- this Style is be added to the parent of TextBox -->
I have an ASP.NET web-site with authentication using ActiveDirectory. Now , when an authenticated user opens a page - he is automatically authenticated. I have faced a problem - when a non-authenticated user (for example, a Mozilla Firefox user with not defined network.automatic-ntlm-auth.trusted-uris property) opens a page, IIS sends 401 response and prompts for a login password. What I wa
我有一个使用ActiveDirectory进行身份验证的ASP.NET网站。 现在 ,当经过身份验证的用户打开一个页面时,他会自动进行身份验证。 我遇到了一个问题 - 当未经身份验证的用户(例如,未定义network.automatic-ntlm-auth.trusted-uris属性的Mozilla Firefox用户)打开一个页面时,IIS会发送401响应并提示登录密码。 我想要的不是提示他输入登录名密码 - 只显示一个自定义错误页面。 这听起来很简单 - 通过身份验证的用户可以