excel

Error in reading a uploaded .xls excel file in asp.net

Hi, I have made a program where I read set of records from the database and then save it in a datagrid. From here I make the user download the file as a excel file. Now the user make changes to the file and then upload it again and from here I read the uploaded .xls file and make the necessary changes in the DB. The problem is wheneve...

Inserting in Excel sheet from another Excel sheet

I am trying to read one excel sheet and then creating another excel sheet through OleDb In this another excel sheet, I made some colums like Name char(10), Age Number now when I reading that excel sheet and trying to insert the values in this another excel sheet then values are inserting but also contains one extra char i.e single quot...

Convert Text to Number Format In Excel

How to convert text to number, especially negative value:- 9,669.34 to 9,669.34 2,553.57- to (2,553.57) When I used this formula, =SUBSTITUTE(A1,CHAR(160),"")+0, it works well but only for positive value. I rcv'd #VALUE! for all negative values. ...

Error while working with excel using python

while my script is updating one excel same time if i am going to do any other work manually with another excel error occurs i am using dispatch from win32com.client import Dispatch excel = Dispatch('Excel.Application') excel.Visible = True file_name="file_name.xls" workbook = excel.Workbooks.Open(file_name) workBook ...

How can I read the header of table in Excel and display it automatically on a ASP.NET MVC page?

Hello, (finally) I was able to read a Excel file located in the App_Data folder and display it on a view. Now I'd like to push the logical further. Instead of writing the following header tags on my page by hand, <tr> <th>ID</th> <th>First Name</th> <th>Last Name</th> </tr> I'd like to be able to read the first row on my...

Bizarre VSTO behaiour when returning values to a UDF from a catch{} block after exception thrown

Hi, This one is pretty weird ... I have a VSTO Excel 2007 project for C# where I create a bunch of worksheet functions that return object[,]. They all work fine but I wanted to return exception messages/stack traces when the function fails. When I tried this I got #VALUE!'s everywhere. So during troubleshooting the issue I created a s...

How to consolidate data by domain in excel?

I have a spreadhseet that looks something like this: Referrer --- Clicks --- Conversions http://google.com/search?q=hello+world ---- 12 ---- 3 http://george.com ---- 4 ---- 1 http://google.com/search?q=yeah ----- 3 ---- 3 http://george.com/2010/3/this-blog ----- 4 ---- 0 http://www.wave-runner.com/hey ---- 3 ---- 0 How can I write a m...

Get Worksheets in Excel Workbook without opening file

I'm building an ASP.NET MVC 2 intranet application in which users will upload data files. If a file is an excel spreadsheet, the user should be given the option to select which worksheet they would like to import. Some of these files can be very large, so will be imported asynchronously. But it would be great to grab a list of the worksh...

Using MS Word to directly query a db for mail merge

Currently, I'm using Excel 2002 with a ODBC connection to query an Oracle DB by User ID # and to return a set of parameters such as Name, Address, etc. to fill a mail merge form in Word 2003. I wanted to know where I could automate this process to the point that I would open up Word, be prompted for the User ID and being able to have the...

Prevent Excel from quitting

Update: I still don't have a viable solution to this question, new proposals are welcome! I'm missing an Excel.Application.Quit or an Excel.Application.BeforeQuit event. Does anybody know a workaround to mimic these events? Given an Excel.Application object (COM Interop in C#), how can I: Preferrably prevent Excel from quitting? If t...

Read an Excel field as string even though there are only numbers in this field

I have an Excel spreadsheet with, among onther things, numbers that are identifiers. My odbc reader should return me something like '55201562000016', but too often it returns me something like '5.52016e+008'. I only do the following, but apparently it does not suffice to tell the reader that it should be treated as a string and not an e...

Column count check for csv before the csv is loaded in multiple worksheets using macro

Hi, I have an workbook with 3 worksheets.I want to load the a single sectionedwise csv to the multiple worksheets but before loading the csv I need to do the column count check to ensure that correct csv is loaded. the csv will be as follows : #3GMACRO,,,,,,,,,,,,,,, ,,,,,,,,,,,,,,, IMSI,IMEI,Date,Time,UMTS MACRO-PARAMNAME,...

Values changing when importing from Excel with C#/OLEDB

Hey all, I'm trying to import some data from an Excel spreadsheet into my C# application using OleDB. I use the standard connection string with the IMEX=1,HDR=YES options Provider=Microsoft.ACE.OLEDB.12.0;Data Source={0};Extended Properties="Excel 12.0;HDR=YES;IMEX=1" I have a column where the values are mostly the text: TRUE or FALS...

Conditional Self-Referencing Formula (only execute if cell value == "")

Hello, here is my problem with the execution of an excel formula. These are the requirements: I have several lines in an excel sheet. At the end of each line there is a field called "Month". If someone enters new values in this line, the current month should be inserted. If the values get modified, the month must not be changed. T...

SQL Server 2008 / 64Bit - How to create a query including Excel

We are running SQL Server 2008 on 64bit boxes. We've had a request to create a query that has a Where clause that draws data from an Excel table. In pseudo code, the query might look as follows: Select column1, column2, column3 From MyDatabase.MyTable Where column4 IN (Select all values from column 'A' in SubIDs.xls whose sheet name is ...

How to use DynamicJasper to create an excel spreadsheet with formulas for subtotals of columns?

I would like to like to produce a Excel spreadsheet using DynamicJasper that computes subtotals of columns using formulas. For example: Employee Department Expenses ---------------------------------------- Alice Sales $600.00 Bob IT $400.00 Charlie IT $450.00 ...

Importing excel data in mysql database

Hi friends, I have a excel file with about 5000 rows to be insersted at one of my mysql databse table, can anyone give quick and dirty solution ? Thanks ...

How to disable the Calculate Cells option before opening the workbook?

I've got an Excel workbook that's got some crazy calculations in it. I managed to close it but every time I open it it just goes into calculation mode! Since it's calculating I can't go into options to change calculation status to manual for this workbook. And pressing ESC doesn't help. Is there a way to disable calculations without ope...

Find the string and get data

I have 2 excel worksheets. Sheet 1 Column A = ID number Column B = Name Sheet 2 Column A = Name Column B = ID Number Sheet 1 is database for all the ID numbers and name in the system And in sheet 2, I just want the Id numbers for the name already typed before. I don't want to use any macros. ...

multi thread in Excel 2007

Hello All, I have a question/problem on running a macro with some level of concurrency in Excel 2007. Here is my situation. (1) I am using Excel 2007 (2) My PC is an Intel Dual-Core. (3) For this test, macro is very simple and defined in a module. Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) Function simple_macro(...