excel

reading Excel Open XML is ignoring blank cells

i am using the accepted solution here to convert an excel sheet into a datatable. This works fine if i have "perfect" data but if i have a blank cell in the middle of my data it seems to put the wrong data in each column. i think this is because in the below code: row.Descendants<Cell>().Count() is number of populated cells (not all...

How to copy cell range as table from excel to powerpoint - VBA

I cant find any way to do this. What I have now is that it copy the range as an image: Dim XLApp As Excel.Application Dim PPSlide As Slide Set XLApp = GetObject(, "Excel.Application") XLApp.Range("A1:B17").Select XLApp.Selection.CopyPicture Appearance:=xlScreen, Format:=xlPicture PPSlide.Shapes.Paste.Select this works like a charm, b...

Opening/Saving an Excel file to a SQL Server table from within Access

I am trying to figure out how to open/save an Excel file to a field in a SQL Server table from within an Access database. My first choice it to open/save from and to the file system and track file meta data in the SQL Server table, however, the decision is out of my hands. Can anyone suggest any resources or perhaps point me to some samp...

Fastest way to interface between live (unsaved) Excel data and C# objects

Hi, I want to know what the fastest way is of reading and writing data to and from an open Excel workbook to c# objects. The background is that I want to develop a c# application that is used from Excel and uses data held in excel. The business logic will reside in the c# application but the data will reside in an Excel workbook. T...

How to copy cell range as table from excel to powerpoint - VBA

I cant find any way to do this. What I have now is that it copy the range as an image: Dim XLApp As Excel.Application Dim PPSlide As Slide Set XLApp = GetObject(, "Excel.Application") XLApp.Range("A1:B17").Select XLApp.Selection.CopyPicture Appearance:=xlScreen, Format:=xlPicture PPSlide.Shapes.Paste.Select this works like a char...

Report on users who don't estimate well in Excel

I have a spreadsheet corresponding to entries of a user, their estimation, and the actual value (say, of hours for a particular project), which we can represent in CSV like: User,Estimate,Actual "User 1",5,5 "User 1",7,7 "User 2",3,3 "User 2",9,8 "User 3",6,7 "User 3",8,7 I'm trying to build a report on these users, to quickly see whi...

Open a web page inside Excel?

I'm looking to develop a simple excel plugin that sends data from Excel to a web site and then displays that web site inside excel (presumably with IE). Can anyone point me resources that might be helpful? ...

Excel/VBA: How to paste SQL query with proper string formatting

Hi folks, I've been writing some pretty long SQL queries in notepad and then pasting them into my VBA code as-is and then formatting the multi-line string correctly each line at a time. For example... In my text editor, the query looks like this. SELECT a, b, c, ..., n FROM table1, table2, ...

VBA: How to change the value of another cell via a function?

I'm an Excel VBA newbie. How to change the value of the specified cell via a user-defined function? What's wrong with this code: Function Test(ByVal ACell As Range) As String ACell.Value = "This text is set by a function" Test := "Result" End Function My wish is ... when I type =Test(E6) in cell E1, Excel will display the specifi...

Text Format in Excel using VBA

Hi, When I use WinSQL to run a SQL statement, the result is 20100803000001812. However, when I incorporate the SQL as a macro, the result is 2.01008E+16. What should I do in the macro in order to maintain the result as 20100803000001812 ? Thanks, Bob ...

Excel 2007 shadow copy ?!

Hello, my question is about Excel addins and vba code. This is the situation: There are 2 Excel files. One is just a normal Excel sheet, one is a .xla addin which is stored on a network drive. In the .xla file I have the Vba code. In the normal Excel sheet is a reference to the .xla file so that the sheet can use the macros from the...

mysql: using one field to contain many "fields" to save on fields

Hi I have a project which needs an Excel GUI (client's request) with a backend mysql db/table requiring almost 90 fields. (almost 60 fields are duplications of 6 fields.) After giving it some thought, I ended up creating a table with 11 fields: 10 searcheable fields, and one big field which can contain up to 60 fields "together", separ...

Convert to Text Format In Excel

Hi, I'm extracting some data from AS400 using excel macro. In the AS400, this particular column (Ref), shows 20100729000078154 but when I extracted it to excel, it will be 2.01007E+16. I need to hv 20100729000078154 as my final output. This is the macro that I used to extract the info from AS400 :- Sub Extract() Dim StrSQl As String ...

How to replace every existing values of a column with formula?

My sheet currently has already data. Unfortunately, later I realize that all values in column E should be validated and changed as necessary by calling my own user-defined function and passing the values as the function parameter. For example, just says I have the following data in column E: E1: "This is a text in (E1)" E2: "This is a t...

Calculate Sum of the cells in Excel using C#

Hi, I am using windows application,in that windows application i have exported grid view to excel successfully. now i want to calculate sum of cells in the excel sheet in a particular cell... i tried it but it goes exception... can anyone tell me what i did wrong? How to solve that problem? or tell me any other solution for do this.. ...

Read from excel file with square brackets in header C#

Hello. I'm trying to read from excel file with oleDB provider using C#: using (var fileConnection = new OleDbConnection(fileConnectionString)) { var command = new OleDbCommand(@"Select SourceName, [ExternalID] FROM [page1$]", fileConnection); fileConnection.Open(); ...

Copy OLEObject from Excel to a newly created Powerpoint

Hi, I'm struggling to get the API usage correct, even after hours of searching. Basically, I want to do the following from my Excel file. 1) Create a new Powerpoint presentation and slide. [DONE] 2) Copy OLEObject from the Excel file into the Powerpoint slide. What I have done so far for the no. 2 is Dim s As Shapes For Each Obj i...

C# Clipboard Help

Hi, I am copying the contents of an Excel file onto the Clipboard within a program I have written. I can then use that data in memory rather than 'chatting' constantly with Excel. When I have finished with the data, I cal a cleanup method that calls Clipboard.Clear() first and then closes all Excel sheets/workbooks/apps, etc. The pro...

jqgrid Data Load from Excel

Hi, does jqgrid (free or commercial with PHP) have an OOTB function to Import Data from Excel? i see export options and examples in my search, but i dont see any for Import. Is this supported Out of the Box, or does one have to write their own PHP for that? I am considering purchasing the commercial version, but want to be sure before ...

Persistent ODBC connection from Excel to Oracle view

Have excel set up to pull some count and sum information from a database view in oracle using ODBC. In my sheet I want to populate about 10 different fields in one sheet with the single result from different queries. It works except for one thing. Every time I open the file it asks for the database username and password 10 times. ...