excel

vba: what is 97.45 * 1# = ?

some_integer = 97.45 * 1# what does this notation mean? what will some_integer = ? ...

How do I perform a monte carlo simulation in Open Office?

Hello all. I am trying to generate some ranges for a problem I am working on. These rangers are going to be based on the sum of the ratio's of a bunch of numbers. So for example, the constant's are 5 6 and 7. The ranges I get will be 5/x + 6/y + 7/z = S I want x, y, and z to come out of a list of numbers I have - say .5, .6, .7, .8, ....

Implement anchor onclick event using HTML document object from Excel VBA

I am trying to implement an onclick event for an anchor tag on a website from Excel VBA. The following code gives me error message. Set iePage = ieApp.document Set ieAnchor = iePage.getElementsByTagName("A").Item(5) ieAnchor.onclick = true The error message is a run time error that says 'Not Implemented' Can someone please advise on g...

Is there a fast way to get the number of rows in an Excel sheet using ADO.Net?

Is there a better way than string connectionString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=<xlxsName>;Extended Properties=\"Excel 8.0;HDR=YES;IMEX=1;ReadOnly=True\""; string sql = string.Format("SELECT COUNT (*) FROM [{0}] ", worksheetName); using (OleDbConnection conn = new OleDbConnection(connectionString)) { OleDbCommand...

Algorithm to get the excel-like column name of a number

I'm working on a script that generate some Excel documents and I need to convert a number into its column name equivalent. For example: 1 => A 2 => B 27 => AA 28 => AB 14558 => UMX I have already written an algorithm to do so, but I'd like to know whether are simpler or faster ways to do it: function numberToColumnName($number){ ...

How do you run another .exe from VB.NET as another User?

How do you run another .exe from VB.NET but as another User? I expect to launch a .exe like "Left Click -> Run As -> Enter User/Pass -> Click OK" If I do that, my application runs as expected (I need to run it as another user to get access to some folders in the network) But if I use this in VB.NET System.Diagnostics.Process.Start(Syst...

How do I create a dynamic 100% stacked column chart using VBA?

I have a macro which updates a cluster column chart when values are entered in the range start and range end cells. I would like to edit this VBA code to instead create a 100% stacked column chart. How do I do this?? See example of current code below: Sheets("Inputs1").Select 'ActiveSheet.Inputs1.Select Range("A4").Select RangeStart ...

create excel using Java

I am very new to java. I am trying to fetch some data from a database and the result set is displayed in excel. I am able to inetract with database. But how should I go ahead for inserting data into excel sheet.Its simple Java program and in future I would like to generate files in other format say PDF, doc etc. I am looking for an appro...

Name cannot be same as builtin name

I generate a excel file using NPOI ,It works fine.However when i take that excel file to some other computer and open it gives the input box with warning message "Name cannot be same as built in name" is shown. When client enters any values in the input boxes the sheet finally opends but is a lot of trouble to the client .I searched the ...

Please help..Anyone know how can I make a chart to sum all the data of each week only if values are greater than 0?

Hi all Basically I have a table like this: Week | Value 1 | 2 2 | 3 2 | -1 2 | 1 2 | 1 3 | 4 3 | 2 6 | 4 7 | 1 I need a chart to show the sum of the values for each week only if the value is greater than 0... so for week 1 --> 2 ...

How to stop Excel storing the absolute path to an XLA?

I have an XLA file that is to be deployed to a number of users in the organisation as an Excel add-in. My intention is to deploy it to a directory in the user's "documents and settings" folder in "Application Data\MyCompany". (In fact this is all working through a wrapper that copies the latest version of the XLA locally and installs it ...

Reading dates in a spreadsheet to and from a DataSet

Hi! My application uses a badly arranged Excel spreadsheet as a data source. I say badly designed because there's no unique identifier to each row aside from the column where dates and times are found. Long story short, my app uses the date and time on each row as an identifier to retrieve information from the other columns in the row....

Find maximum number in discrete groups in spreadsheet

I have a list of numbers, each group of numbers is separated from the other group by the number zero "0" or many zeros. I would like excel to get the maximum number of each group and post it in a cell automatically. ...

Can I create database schema based on a non-standard raw Excel format?

Schema has been described crudely in Excel as follows: tablename columnname columnid type length description table1 table1col1 1 int 4 blah blah table1 table1col2 2 varchar 15 dah dah dah table2 table2col1 1 int 4 etc table3 table3col1 1 money 10 $$$ There is a ...

proper way of renaming / backing up files

i am constantly making changes to access and excel file macros and databases. what i usually do before i modify the file is i make a copy of the file and rename it to the filename_todaysdate.ext. is this the proper/safest way of doing things? ...

How to make correct date format when writing data to Excel

Iam exporting a DataTable to an Excel-file using office interop. The problem is, that Excel does not recognize dates as such, but instead it displays numbers. In another case I pass a string which it then recognizes as a date. In both cases the data is messed up. I tried NumberFormat @ which is supposed to store the cell in text format,...

How to add a comma to the end of a list efficiently?

I have a list of horizontal names that is too long to open in excel. It's 90,000 names long. I need to add a comma after each name to put into my program. I tried find/replace but it freezes up my computer and crashes. Is there a clever way I can get a comma at the end of each name? My options to work with are python and excel thanks. ...

Problem in regex pattern

I have [$-809]d mmmm yyyy;@. This will print the date like this: 8 May 2010 but I want to print like this: 8 May 2010 I want the line break in this date. How can I do this? ...

How do you reference the HTMLSelect object from VBA?

I am trying to reference the HTMLSelect object in VBA. Assuming I have a form on the html page and a select control named LB. I can't figure out why I get an error message using the code below. Dim ieApp As InternetExplorer Dim ieSelect As HTMLSelect Dim iePage as HTMLDocument Set ieApp = New InternetExplorer ieApp.Visible = True ieAp...

vba: excel SAVE on close

when you close excel and you have edited your VBA code it does not prompt you to save. i just wrote 300 lines of code and it did not get saved. how do i force it to prompt when closing? ...