excel

reporting tool/viewer for large datasets

I have a data processing system that generates very large reports on the data it processes. By "large" I mean that a "small" execution of this system produces about 30 MB of reporting data when dumped into a CSV file and a large dataset is about 130-150 MB (I'm sure someone out there has a bigger idea of "large" but that's not the point....

Rows and Column of Excel File

It is possible to write a code that specifying the rows and column of spread sheet in terms of NUMBERS and NOT LIKE (B2:D6) Example: excelSheet.Range("B2:D6").Interior.Color = RGB(100, 100, 255) instead of B2 and D6 I want to write 5 rows and 3 column.. It is posible to write in vb.net 2003 code? ...

How to get the reference of latest version of MS Excel in VB.net application?

I am using Excel Interop in my VB.net application. I am using Microsoft Office 11.0 Object Library and Microsoft.Office.Interop.Excel for excel automation. Both the dlls are for Office 2003. My question is, how can I get my project to refer to the latest version of MS Office( say Office 2010) ...

Read image from cell of excel in c#

Hi, Hi , i am reading the excel sheet from c# by using interop services. My sheet have one of columns has in each row as text and same cell has image. I want to read this image. means R1C1 has both text & image , same in R2C1,R3C1...so on. how can i read image from each row? Edited: I want to get this image in jpeg formate. ...

Problem opening Excel workbook using Excel Interop

Hi everyone, I'm writing a C# forms application to open an existing Excel workbook using the Excel Interop. Everything works fine. I can read and write fine. I do not save the workbook until the user close the C# application. The problem happens when my program is running and the user accidentally opens the same workbook with Excel. I g...

Highest populated dimension of an array vba

Say i have an single dimension array (to keep it simple). Is there a simple way to tell what the highest index of an element that was explicitly assigned a value? other than to loop through and count? I know Ubound finds the highest dimension of the array but that's not what I need. Is there something like Ubound but it only counts popu...

C# Excel Interop : Excel process remains in memory until parent form closed.

Hello, In my form I am doing something as simple as private void btnPrintPickList_Click(object sender, EventArgs e) { using (var salesRpt = new SalesOrder(CurrentItem())) { salesRpt.CreateSpreadSheet(); salesRpt.Dispose(); } } I have followed the "no 2 dots rule for excel interop". protected ExcelSheet(bo...

Excel and pgSQL

How do I import data from a excel sheet onto a PGSQL database on linux? ...

Apache POI Comment Excel

I need to add a comment to an HSSF Cell in Excel. Everything works fine the very first time but if I open the same file and run the code again it corrupts the file. I've also noticed that I need to create a Drawing object on a Sheet only once: _sheet.createDrawingPatriarch(); If the line above gets executed more than once comments w...

how to open Excel sheet with full access in c#

open Excel sheet with full privileged in c#. it is not allowing me to read. asking for uname and pwd when i deploye my c# application in iis. i have write this code for open Excel : please review Excel.ApplicationClass app = new Excel.ApplicationClass(); Excel.Workbook workbook = app.Workbooks.Open( ...

Excel interop: Restore minimized window

In my winforms app interacting with Excel through the com interop, I'm trying to attach to an existing Excel process if there is one. Getting the object seems to work well, but if the Excel application is minimized (which is quite likely in my use case), I don't manage to restore the window and bring it to the front. I've tried the fol...

How do I store program state information in a saved excel file from an application-level add-in?

I'm trying to make an application-level add-in for Excel and I would like to store certain information about the program's state. The information I want to store pertains to the state of each Excel file (rather than across all Excel files). ...

How do I set locked cell protection options in Excel with C# and Interop?

Here's the background info. I have an app that writes to an excel 2007 .xlsm file and I am using C# and the Excel 12.0 interop object libraries to do it, along with Visual Studio 2010. I am able to change the cell values and formulas, set the font and font style, set the cells to locked or not, etc. The last thing I need to do is to set ...

import txt files using excel interop in C# (QueryTables.Add)

Hi all, I am trying to insert text files into excel cell using Querytables.Add; no error, but the worksheet is empty. except for the single cell manipulation using Value2 property. I already using macro to record the object used. Can you help me on this(I am using vs2008, C# , excel 2003 and 2007; both shown empty cell). Below is my ...

How to have an excel addin read rows from a worksheet until no more data?

I've started writing a Com addin for Excel 2003 using C#. I'm looking for a code example showing how to read in cell data from the active worksheet. I've seen that you can write code like this: Excel.Range firstCell = ws.get_Range("A1", Type.Missing); Excel.Range lastCell = ws.get_Range("A10", Type.Missing); Excel.Range worksheetCells =...

Is it possible to write an Addin that works in both Excel 2003 and 2007?

I've been writing a shared addin for Excel 2003. It adds a menu (CommandBarPopup) and a couple menu items off it (CommandBarButton) that when clicked open a WPF window to read a couple values and manipulate the worksheet. Is there a way to write it so that it would work in office 2007/2010 as well, or is it impossible? If so, can anyo...

How to paste special in Excel using Applescript?

I am using Applescript to create a macro where data is transferred from several files to a single file. Data is copied with copy range the_range destination clipboard and pasted with paste worksheet active sheet destination range "A1" The problem is that most of the formatting is lost and I have not managed to get the "paste specia...

Create an automatic date stamp in excel from an entry.

I am trying to have a date stamp event happen in column B when an entry is made in column A. Now i can do this in VBA with no problem, the trouble i am running into is there is also a entry that will eventually go in say column D and would need a date stamp in column E as well. is this possible. here is a sample of the code i have used s...

Need help nesting an Excel calculation

Here's what's currently happening: Z8: 100 Z9: =((Z8*W2)+Z8) Z10: =Z9*X2+Z9 Z11: =Z10*Y2+Z10 I start with a value of 100 and then add data from W2, X2 and Y2. This works, but it spans across three cells. I need it to fit into one. I'm drawing a blank on nesting the equations to fit into the one. Help? ...

How to format a datetime so that Excel will understand it?

I have a script which outputs a CSV file. How should I format dates or date+time fields so that Excel will correctly parse that field as a date? PS: I'd like to keep timezone information intact as well. ...