excel

Linq: Sum of int

I am getting "The null value cannot be assigned to a member with type System.Int32 which is a non-nullable value type" When executing Sum() of my empty statement. ResultView works fine, but either var r = from v in DataContext.Visits join bs in DataContext.BaseContents on v.BaseContentID equals bs.Id where (bs.CreatedBy ...

Escaping Parentheses in Excel

I have an ASP.Net website that allows you to export a Gridview to Excel. The Gridview has some column headings with words and then numbers surrounded by parentheses like this: Abc<br>(43) Xyz<br>(55) I have set the bound field's HtmlEncode property to False because I do not want it to escape the line break tags I have in there. This i...

Is it possible to do Undo/Redo in Excel using C#?

My VSTO application is a C# Add-In. I would like to add some undo(Ctrl +z) and redo functionality(Ctrl +Y). ...

Can someone help me speed up this db 2 excel code

My table.Rows.Count=8000.Work on C# vs05 DataSet ds = null; DataTable dtTable = null; ds = oBOGeneralReport.GetsBoardExcelPreview(_oGeneralReport);//.GetsBoardPreview(_oGeneralReport); if (ds == null) return; if (ds.Tables.Count > 0) dtTable = ds.Tables[0]; if (dt...

Using late binding to get a specific instance of Excel in C#

Hi all, Just after a little help with late binding. I am trying to late bind excel and i don't have any issues doing that. It is only when I have more than one instance of excel open where I run into some problems. I would like to be able to determine what instance of excel to bind to (and the link events etc.). Main reason being I ha...

Create Excel chart programmatically in PHP

Hello, Do you have any idea on how to create a chart in an Excel sheet programmatically from PHP ? I know you can invoke the Excel COM object, but the server is running on a Linux machine... I already use the excellent PHPExcel library but they do not offer the option to create charts. Thanks ! ...

Could inner excel row properties could affect oledb visibility?

ader doesn't show the first row of xls file, selected with select * from [sheet$]. Probably some inner excel row properties could affect oledb visibility? ...

Best method for importing csv or excel file to SQL Server 2005 using .net MVC view

Hi, I'm looking for the best method for importing csv or excel file to SQL Server 2005 using .net MVC. Thank you. ...

Excel - allow copy/paste but no data entry

Hello, I have an Excel sheet which is protected and a few contiguous cells which are editable. Is there a way I can allow a user to copy paste data into these cells, but the user should not be able to type in values directly into these cells? I am willing to accept a solution using VBA too. Thanks in advance. Regards, Anindya ...

com interop: how to consume c# from Excel or Access

I see plenty on the web about VSTO and automating excel from c#, but very little to get started on wiring up a c# assembly to make it visible from Excel. Can someone point me to some very basic info explaining how to create a COM interface, GUIDS, ComVisible etc? ...

How can I install "DataMining Adding for Office 2007" as part of my setup?

I'm writting a setup program that needs to install the DataMining Adding for Office 2007. 1) How do I detect if it's already installed? 2) If it is not installed, I download and run the MSI (SQLServer2008_DMAddin.msi). But how can I run the Server Configuration (Microsoft.SqlServer.DataMining.Office.ServerConfiguration.exe) tool myself...

Writing data to cells in Excel 2007 / PowerShell

Hello, Why can I not write values to Excel using the Worksheet class, or Sheet interface? I would expect to be able to do something like this: [Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.Interop.Excel") $Excel = New-Object Microsoft.Office.Interop.Excel.ApplicationClass $Workbook = $Excel.Workbooks.Add() $Worksheet = $...

Formatting Excel cell with Microsoft Interop

Hello, I generate some Excel file with Microsoft Interop, no problem, I can create files, sheet, file, password protect. But I'd like : for a specific range allow only numbers for an another specific range allow only numbers but only 0 or 1 Do you have an idea how to do this ? Thanks, ...

How to add user id in Excel header / footer?

Does anyone know how to add user id to the Excel header or footer? I know I can set it in a macro but I'm trying to avoid it. Is there any shortcut like &D or &t for user id? ...

collate 500 excel sheets into database

i have 500 excel sheets which are used for data collection from various organisations i need to collate all the data into a variety of summary excel sheets at the moment this is all done manually, cut and paste and then create big forumlas to calculate across several sheets to tally it up i am looking to automate this somehow, I would ...

What is error code 0x800A01A8 coming out of Excel ActiveX call?

I am using LabVIEW to talk to Excel via its ActiveX interface. For some reason after some time successfully writing to a spreadsheet I got this error when attempting to call the a function which does something with the range. Sorry this question is so vague, but its because I am actually using another toolkit to take care of the Excel ...

Excel formatting question, default line color

Hi, What is the default line setting in an Excel spreadsheet? You know, the line that goes around the cell? Color? Line thickness? Transparency? I am creating a workbook using asp and html and want to format the lines so that it looks like the default settings. Many thanks, R ...

Using Lua for working with excel.

I am planning to learn Lua for my desktop scripting needs. I want to know if there is any documentation available and also if there are all the things needed in the Standard Lib. Thanks a lot in Advance, Animesh ...

append a text string to the left of all the cells of a column in excel 2002?

Hello ! I have two columns with two values.. I want to append some text to the left of all the cells of Column A and concatenate to the right of all the cells of Column B. Basically I'm trying to avoid having to type in a whole bunch of sql updates. so for example if i have an excel with ID Employee Name 135 Rasputin 76 Bush I wan...

Powershell 1.0 Excel Automation - Problem with "Font.ColorIndex"

I’m trying to automate Excel in Powershell 1.0 and am having problems trying to apply a cells “Font.ColorIndex” property. The following Microsoft KB article details a BUG with Excel automation when the computer running the script has a locale setting other than “en-us” My example script below works perfectly when I manually change my l...