excel

converting an Excel (xls) file to a comma separated (csv) file without the GUI

Is there a simple way to translate an XLS to a CSV formatted file without starting the Excel windowed application? I need to process some Excel XLS workbooks with scripts. For this i need to convert the xls file into a csv file. This can be done with a save-as from the Excel application. But, i would like to automate this (so, not open ...

Changing Legend Type in Excel

I have a line chart, where the chart legend also in forms of line. Is there a way I can change the legend type from colored 'line' to colored 'circle' or 'square'? Figure like ...

Compact Framework Charting

Hi! I'm doing an app in .NET Compact Framework 3.5 and I need to do some charting (xy, bar graph, pie and so on and stuff)... Is there any open source library to do so? Which Excel classes should i call to do so? thanks in advance ...

How to convert Excel.Range.Interior.Color to System.Drawing.Color in C#?

I have an excel sheet with some cells having some background color. I need this color in html code and hence I want to convert Excel.Range.Interior.Color to RGB format or System.Drawing.Color. After doing that i would be using System.Drawing.ColorTranslator.ToHtml(System.Drawing.Color) to get color to be used in html tags. I tried doin...

Can't assign macro in excel

I am having some trouble with macros in my excel workbook. I have a couple of auto-shapes on one of my sheets which are grouped together for drawings. 2 of these have macros assigned to them (as 'kitchen - 1.xls'!but59 and 'kitchen - 1.xls'!but60), but I can't seem to assign macros to the other 2 shapes. I have tried right clicking on...

What causes Error 70 in Excel VBA?

I have some code which keeps causing an Error 70: Permission Denied in my VBA code. I can't work out why, because I know that the worksheet is unprotected and that I can make changes to it. The code in question is sh.Name = "square" It attempts to rename a shape that has been copied from another sheet and pasted into the sheet - ...

Error reading from Excel in C#: "...could not find the object..."

I have more or less exactly the same error as in this post, but that solution has not solved my problem. The error message I get: The Microsoft Office Access database engine could not find the object 'Adresser$'. Make sure the object exists and that you spell its name and the path name correctly. I have checked and double-checked th...

Sort Excel Grouped Rows

I have a spreadsheet that has information in groups. The header row contain company names and information and then the grouped rows beneath them contain names of people in the company. Company Name | Number of Employees | Revenue | Employee Name | Email | Phone Is there anyway to sort by the number of employees and/or reve...

Fiscal Year in Excel When Browsing SSAS Cube

Hi I am using Excel as the front end to a SQL Server Analysis Services (SSAS 2008) cube. I have a "calendar" dimension, which consists of a hierarchy of year-quarter-period where period is a 4 or 5 week month. Excel offers lots of useful options under its "Date Filters" menu such as being able to select just Quarter 1 etc. This works ...

Is there a tool for making Excel sheets (xlsx) validation?

I'm creating some excel sheets (xlsx) through Excel Package library. Some of them are corrupted, so when I try to open it on Excel, a generic error is displayed and the file doesn't open (the error: "The converter failed to save the file" - this is because I'm using Excel 2003 with compatibility pack, maybe in Excel'07 the error is diff...

How do I save an Excel 2007 file in "OOXML" (xml text) so that I can modify it in code?

I made an Excel file with data on tab 2, and a chart on tab 1. This is for a web-portal where investors can download the excel document with ubber graphics and the like, but with their data. So, the 'simple' fix in my mind is to save the Excel document as "OOXML" and just replace the data items. However, it seems that the document is en...

Problem with getting Excel cell background colors in C#

I am trying to get background color of some cells in an Excel sheet in C#. I am using follwoing code for it: Excel.Range r = (Excel.Range)m_objRange[i, j]; int decValue = int.Parse(r.Interior.Color.ToString()); string hexValue = decValue.ToString("X"); So i get the long decimal value and then i conver...

Using "Show values as" option in Excel 2007 pivot table when source is SSAS cube?

I have an Excel 2007 pivot table showing "Year" across the top and "Month" down the side. What I am trying to do is represent the values as "% Difference" from the same month of the previous year. (Ex. If Jan-07 is $100,000 and Jan-08 is $120,000, I would like Jan-08 to show '20%'). However, every time I try to do this (using the "Sh...

Conditional Formatting for background color and text based another cell value

Hello, I want to be able to test the value in cell $A$3 and determine if it has the text "YES" entered. IF $A$3 is "YES" then the cell $D$3 background should be set to a color and the text for cell $D$3 should say "NA". I've tried using the following for Microsoft Excel 2003, but does not work. Any guidance would be appreciated. Thank...

Updating excel charts automatically each month with new data and rolling the last month off the end

I have been given a set of historic data that requires line charting for the given range (say 12 months). We insert a new column at "B" each new month so the historic data moves along one column. Can we automatically update the chart with the new months data and roll off the previous last month from the chart when we insert the new data...

Embedding PowerPoint Chart into Excel

Hey guys! I always get great answers here, so here is another question (this one may be simple, but I don't know if/how...). If I embed a PowerPoint Presentation within an Excel Worksheet, then, within the ppt, set up chart objects on each slide, can I go into the data table for the chart object, and have it refer back to the excel spre...

Excel Object in asp.net

Hi I have a serious issue. I am using excel object for opening the excel file it works fine i my PC. when i make application as a website and running the page and uploading it gives the error "'C:\Documents and Settings\Administrator\Desktop\Work\SABRE MSO Mapping Request Template.xlsx' could not be found. Check the spelling of the file ...

How do I automate a report on variance in the same SQL table fields on monthly basis?

I have a T-SQL view with integer fields. I need a report on a monthly basis regarding the difference from one month to the next, i.e. so many people were engaged in a particular activity on 8am of the 1st of this month, so many the previous month, here is the difference. The numbers fluctuate all the time. I need a variance between 2 sna...

JExcelAPI - writing date to Excel sheet ignores day, month and year.

I try to generate some Excel sheets in Java application using JExcelAPI (v. 2.6.3) and can't generate date cells properly. For example, for code: WritableWorkbook workbook = null; workbook = Workbook.createWorkbook(new File("C:\\tmp\\tests.xls")); try { Date date = new Date(); final WritableSheet sheet = workbook.createSheet("Shee...

Creating an Excel SpreadsheetML in code. (Without Excel!)

With Excel 2003 and higher it is possible to use the SpreadsheetML format to generate Excel spreadsheets with just an XML stylesheet and XML data file. I've used this in some project and works quite nice, even though it's not easy to do. From the Microsoft Download site I've downloaded the XSD's that make up SpreadsheetML and in my ignor...