excel

wrting double problem to excel

hi . i have a text and i try to write this text to excel file by c#. this text include not one kind of value. i mean, it can be include "abc" "1.6", "1/6" etc. when i write 1.86 or 1/86 i see "feb.86" in the excel. but i want to see what i write to. what can i do to solve this problem? ...

Importing an HTML table as excel file into SAP

We need to create an .xls file in asp.net which will be imported into SAP. Currently we're writing an HTML table into the response object. I'd like to know if SAP can import .xls files that are in fact HTML tables. ...

Using Excel source on a machine without excel installed in SSIS

I have made an SSIS package that uses the Excel source to extract data from an Excel 2003 file and inserts it into SQL Server. When executed on production machine it gives and error of 'productleveltoolow'. Excel is not installed on the server. Can this error be due to this reason? ...

Using a query string in an excel hyperlink to an ASP.Net Web Application

I want to pass some data between an existing excel application and an existing ASP.Net VB Webforms application. I thought a hyperlink with some query string variables would be the most straightforward means of doing this. However, it seems that the hyperlink does not retain the session of the logged in user. Testing this with the same ...

Is there a code generation tool that accepts Excel files as input?

I'm looking to generate some C# code based on Excel data. Basically the Excel sheet contains definitions of functions that need to be generated in C#. My current experience with code generation is mainly with ORM's. But now the "input" is Excel data. I'm asking this to prevent me from re-inventing the wheel. Reading data from Excel is ...

Working with data from an Excel spreadsheet in C#

I have data in an Excel spreadsheet that has 10,000 rows with the following structure: Country | Region | City | Latitude | Longitude ----------------------------------------------------- USA | CA | Los Angeles | 34°03′N | 118°15′W ... The first three columns effectively constitute a primary key. I would like to load t...

SQL Server Openrowset using FTP

My users upload excel files to a folder on the web server. I execute a sproc on the sql server that uses openrowset to open the excel file and import the data into a db table. All of this works great when the sql server and the web server are on the same machine (dev environment) but not when they are separate. I found a post that des...

System.OutOfMemoryException importing Page with a single large DataGrid into Excel (Quick Fix)

We use Excel for a number of ad-hoc pivots / reports. To get the data into Excel we have a general page with a simple DataGrid that we bind from a DataSet / DataTable. We "Import External Data" using this URL in Excel. Unfortunately we have a query that returns around 100 columns and 40k rows. The Application server only has 2GB of RAM...

Analysis Services Excel KPI not appearing

I have an analysis services database with an excel front end. At one point I had the KPI coming though to excel 2007 but now I have no option to select them. Is this a known issue? ...

Excel data wont re-format or calculate

I have a spreadsheet that was created from a webapp. I save it as an excel wkbk. I close file and go to file and open from my pc. When I try to reformat a column of numbers, nothing happens. (it says the format is 'general' and alignment is 'general & top') it appears as all numbers, left aligned. I have tried to 'unlock' the cells...

Save a datatable to excel sheet in vb.net winform application

A year ago I saw a beautiful simple code that gets a data table and saves it in an excel file. The trick was to use the web library (something with http) and I'm almost sure it was a stream. I find a lot of code with response but I can't make it work in a win-form environment. There is also a cell by cell code - not interested -too sl...

Obtaining First Excel Sheet Name With OleDbConnection

Hi, I have one problem. I need to get the excel sheet name in a work book, which looks on the very left sheets tab -the first one from my point of view. I am using this code: public static string GetFirstExcelSheetName(OleDbConnection connToExcel) { DataTable dtSheetName = connToExcel.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, ...

Start Process - then add to it later (MS Excel Example)

I've got a data collection routine that takes about 10 seconds to run, then it saves data to a CSV file: string file = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "Book1.csv"); StreamWriter streamWriter1 = new StreamWriter(File.Open(file, FileMode.Create, FileAccess.Write)); DataTable table = GetMyData...

Importing excel spreadsheet in sql server 2000

I have a question regarding importing( Via the import/export wizard) an excel spreadsheet into sql server 2000. Everything seems to run fine, no errors etc, but when I select the data from my table, I've noticed that it skiped the first row. I thought maybe there was a "1st row is Data headers" flag , but I can't seem to find anything ...

Call methods written in C# in Excel 2007 from cell formulas

I am using Excel 2007. I have C# code written in a separate binary. The code uses static classes and static methods on the classes. I have a reference to the DLL in my VSTO Excel Worksheet project. What do I have to add or modify to get this to work? My C# code looks like this: using System; using System.Collections.Generic; using Micr...

Delete a file after user download prompt

I think this is pretty simple. My program will create an Excel file on the server using Automation. After that, I want to force the user to choose whether or not to download it, then, regardless of the choice, delete the file so it won't just take up space. Any ideas on how I could accomplish this? ...

How to IMPORT a excel file in to MYSQL DATABASE

Hi all, Will any one explain "How to IMPORT a MICROSOFT EXCEL file in to MYSQL DATABASE". For Example MY EXCEL TABLE LOOKS LIKE THIS. Country Amount Qty America 93 0.60 Greece 9377 0.80 Australia 9...

How to effectively buffer and flush stream in Open XML SDK

Hello, I use OpenXML SDK 2.0 to generate Excel file with large amount of data, appox. 1000000 rows, and I need to optimize memory usage because my machine slow down very fast. I want to solve this issue by flushing part of generated DOM tree into file in runtime. I make my own buffering for data. E.g I have 100000 records to write an...

Problems with VLOOKUP in VBA

All, I'm trying to use vlookup in a simple VBA function, but it is continually returning #VALUE! Here is the code: Public Function getAreaName(UBR As Integer) As String Dim result As String Dim sheet As Worksheet Set sheet = ActiveWorkbook.Sheets("UBR Report") ' check level 3 then 2 then 4 then 5 result = Application.Worksh...

Excel Functions

I use this formula to track a recall list; It will tell me if a tool is due,(within a number of days),overdue,or OK. Works fine but I would like to add a "Not Required" if the due date cell,(K3), is left blank. =IF(2*(K3(K3>=$L$2)=0,“OK”, IF(2(K3=$L$2)=1,“DUE”,“OVERDUE”)) ...