excel

C# How to stop user from using program created excel application

Basically I have a program written in C# which uses excel application. While running my program, if the user tries to open any excel file, that file is opened on the excel instance created by my program. I suppose this is related to the fact that excel opens on to existing instance of " Excel.exe ". It causes zombie excel process whe...

Start empty Excel workbook without any worksheets

Creating a new Excel workbook as in: Dim xl As Excel.Application Dim wb As Excel.Workbook Set xl = New Excel.Application xl.Visible = False Set wb = xl.Workbooks.Add Is there an easy way to stop Excel automatically creating Sheet1, Sheet2, Sheet3? I can always delete these unwanted sheets afterwards but that feels like a clunky solut...

Excel: ListObject can't write into a data-bound object's Nullable<int> columns.

I have a VSTO 4 (Visual Studio 2010) document-level Excel 2007 add-in where I use a ListObject to display data I retrieve from a WCF web service, which uses EF to fetch the data from the database. Some of the columns are Nullable<int> (as the database column is defined with NULL, and EF maps DBNull to null), and those that have null are ...

How to keep a value in the Excel validation list dropdown as one item if it has a comma in between.

Hello, We are making a c# application that would generate a XLS file of a certain format. On one of the columns we have added a validation list the values of which would be Dynamic(coming from the database). Sometimes there are values such as "Shoes,Apparel". Problem is if we put this as a formula in the validation list, they appear as ...

Excel formatting

I have a column of IDs that I am concatenating in order to pass the list as a parameter to an SQL connection. The stored procedure uses the parameter buried inside some dynamic SQL, so the formatting I need is odd. Here is the value I am trying to pass: '''007','011','017','020','025','030','031','037','046','047','051','055','066','...

Create Excel XML files from Python

I need to create Excel XML files from Python. The Excel XML format is fairly simple. I looked at a a sample xml file saved from Excel 2003 and it is fairly simple. I'm looking for a a Pythonic, ready made library to create such xml files instead of reinventing one. Something that I can use as below: book = Expy.Workbook() s1 = boo...

Best Ruby library for Excel files

What is the best Ruby library for dealing with Excel spreadsheets? I found spreadsheet-gem but I didn't find it to be as good as PHPExcel - a library I used to use when I was a PHP developer. Please help. Thanks. ...

How use to write programme that involve with a lot of active calculation? In excel 1M+ Row and 20+ column

First, I dont have any experience with programming. If I ever start, then this would be probably my first. I keep looking for answer until I found this site. I am looking outside the box because in excel doing a data of 1 million + row and 20 + column would take a very long time just to wait for the calculation to be done and the copy ...

Powerpoint chart created in Aspose is not very clear.

Hi, I am using Aspose for reading a powerpoint as a tempate and creating a new powerpoint as a report. In the template power point I read the chart and populate the data for the chart. But in the report powerpoint, thechart is fuzzy and is not very clear. But when I edit the chart and save it( I donot change any values or properties )...

c#, Excel + csv: how to get the correct encoding?

Good evening my dear programming gods! I've been trying this for quite a while now, but can't figure it out :-( I'm trying to export data to Excel via a *.csv file. It works great so far, but I have some encoding problems when opening the files in Excel (original string on the left, EXCEL result on the right): Messwert(µm / m) ==> Mes...

Sharepoint and Excel Services - Restrict Access by Tab

Hello, I was wondering if it was possible to have an excel workbook on SP 2010 and make it so that different people would be able to edit different tabs of the workbook - but not the other tabs? I'm pretty new to Sharepoint and am trying to get up to speed, but in my searching I haven't found a way to do this yet. I'm not sure if it's...

Restrict access to excel file opened by C# program.

Question 1: I've opened an excel file with Excel.Application app = new Excel.ApplicationClass(); Excel.Workbook Wbook = app.Workbooks.Open("aaa.xlsx",...); Now, I want to stop other programs accessing "aaa.xlsx". (want to restrict access by other programs like excel.exe & etc) Are there any options that I can set to lock/block/restr...

Excel, Macro/VBA if="x" then select rows and paste to other sheet

Hi Guys, Im stuck attempting to develop a fairly basic accounting spreadsheet for a work project. Im not sure how to add attachements here, so I will try explain as best as I can. Every day I manually enter data into a sheet with several columns, a few examples of column headings I have are: "Tax Invoice No.", "Customer", "Description"...

How to find smallest values in AutoFiltered range?

I have a column with two value ranges, specifically 0-30000 and 60000+ from which I need to extract the smallest two values in the 60000 range. The only way I have found so far to to use AutoFilter to produce the subset of the required data to extract. My problem is that the Autofilter function does not return a reference to a range. If...

Highlight a cell with certain criteria

Hi all, Is it possible to highlight a cell, let's say red, with certain criteria. One could be SUM function returns a minus output. Thanks in a advance, Sun ...

Create excel chart using Apache POI

Hi, I need to create excel sheet from my Java code which contains charts like Bar chart, Line Chart etc using the Apache POI library. Is it possible? I am not able to find any useful code example for the same. Is there any other alternative for this apart from POI library for Java? Thanks in advance, Abhinav Mishra ...

Excel VBA Function to Return True or False based on Cell Background Colors in a Range

I keep a spreadsheet of my timeline at work and when I meet and expect to meet certain milestones. The data (dates) is stored left-to-right and each project has it's own row. The milestones are permantely set and occupy Range(O:AA). My data is color coded as Green (Complete), Orange(Deadline), Blue(Not working on), Red(Not applicable). ...

How to use the "post" parameter with the Excel's 2003 hyperlink "follow(...)" method?

If you look at Excel's help for the Follow Method of the hyperlink object, you'll see that it accepts POST as a way to send the data. How should I fill the "Extra Info" String or byte array? How should I format the data? What is the limit for the data to be sent? Please see below: expression.Follow(NewWindow, AddHistory, ExtraInfo, Meth...

how to get input into an Jet OLE DB Query

Background: I am using Excel 2003 I have 2 Excel files (Source, list), one is essentially my source data. The second is where I am using the excel "Import External data" function to get the data in teh second sheet. I am then using the modifiy query to allow me to use SQL to query my data and limit the data I am displaying. My SQL query...

Fast way of going from Excel to a DataSet or DataGridView

I have data that I'm taking from an Excel sheet with the ultimate goal of displaying in a DataGridView. Currently I am just going over the UsedRange of excel data and plugging it into a datagridview. This works fine, but can get bogged down when there 100+ rows of data. I have also toyed with going from excel into a dataset (using the ...