Is there a way to improve performance in any meaningful way for the following VBA code in Excel?
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Me.Range("Group1"), Target) Is Nothing Then
With wksData
.Range("Group1Column").Value = Target.Column
.Range("Group1Row").Value = Target.Row...
I have two columns, the first column will have the name of a object, the second is who it belongs to. I want a new sheet for each person to list what they had assigned to them. here is a example:
dog F
cat F
bell S
whistle
bird F
So Fred has a dog, cat, and a bird; Scott has a bell; and no one has a whistle on their page. Now doing a...
Hi,
I want the series names of the chart to display as the column names of my information. This works when I have more than 1 column however when there is only 1 column of information it seems to set the series name as the number 1.
I reproduced this manually in Excel it seems to assume that the column name is the name of the chart. Th...
This is probably a simple question, but I really don't know what I'm doing in Excel, so hopefully someone can help me out.
I've been given an Excel spreadsheet that has two relevant columns to my task. The first column is an "External ID", and the second column is an "Internal ID". I need to select a bunch of data out of our databases (...
Is there a Java Open source Library for parsing Excel 2007 Files?
...
Hi Guys,
I have problem creating new instance of excel 2007 using VBA (from Access 2002).
At first I misunderstood the problem and it is more complicated than I thought.
Set myXL = CreateObject("Excel.Application")
Creates new processes (I thought it didn't), but still strange thing is happening. I use OLE to store Excel files in SQ...
I’m well aware of the Microsoft support base article stating that it’s not supported to automate office products UI less. It seems that Windows Server 2008 x64 and Excel 2007 enforce the given statement.
I’m running the following code in a NT Service (Local System account) OnStart method. All it does is Excel automation the way it’s wo...
I am attempting the following formula:
=concatenate(A1, " ", B1, " - ", C1)
Where column A is text, B and C are dates. The concatenate function returns the numerical value of the date, rather than the text value. How do I fix this?
...
I've made an add-in for Excel in VBA and now I need to make changes to the code, but the file won't save. I open the .xlam file, I make the changes, ctrl-S to save with no errors popping up, close down. But when I reopen, none of the change I made are there. What gives? is there some special way I have to save an add-in to make change...
I have a double value I would like to increment, using the following snippet:
Total = CDbl(Total + CDbl(Workbooks(1).Worksheets(1).Cells(1,1).Value))
The code continuously returns a type mismatch error, even though the cell it points to has a decimal value in it. What am I doing wrong?
...
I have a UserForm with ShowModal set True. I want to use the dialog as a form and as a progress bar, so after the user clicks "OK", the form should remain on-screen but code should continue to execute in the background. What's the best way to go about doing this?
Currently, I have two forms, one where the user enters data, and then ...
I am parsing through an uploaded excel files (xlsx) in asp.net with c#. I am using the following code (simplified):
string connString = string.Format("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" + fileLocation + ";Extended Properties=\"Excel 12.0 Xml;HDR=YES\";");
OleDbDataAdapter adapter = new OleDbDataAdapter("SELECT * FROM [Sheet...
Right now, I'm getting it in Excel 2007, but I've gotten the same error in pretty much every version of Excel I've used since 97. The only discernable similarity is that happens on my office PC. It's never bothered me on my home PC.
In Excel 2003, I was able to mess around in the clipboard options until it went away. In 2007, though,...
I'm attemping to update an Excel 2007 pivot table in VSTO (C#) and would like to ensure that the pivot table doesn't get updated until all of my edits are done. So there's a property on the PivotTable class, ManualUpdate, that apparently does exactly what I want. Unfortunately it appears that often times when I assign it the value "tru...
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...
First of I apologize beforehand if this question seems rather “noobish” – but I am entirely new to VSTO development and to StackOverflow, so please bear with me. Thanks :-)
What I am trying to do is to create UDF’s for Excel using VSTO’s C# “Excel 2007 Add-in”-project type (since I just want to generate some general UDF’s). As I am only...
The code previously implemented takes in the xls file saves it on to a column in a table using the stream i use the same method but the only change is the the file saved is a xlsm or an xlsx type file it saves to the column in the database
When I try and get the contents from the database and throw the saved xlsm file or xlsx file I get...
Hi,
Let's assume i have the following range from (a1:c3)
A B C
1 -1 1 1
2 -1 0 0
3 0 0 1
Now i have selected the following range, and formatted it using Conditional Formatting (using default red yellow green color scale).... now range colors became
A B C
1 Green Red Red
2 Green Yellow Yellow
3 Yellow ...
Can you help me rewriting the following Excel VB code to C#?
Range("C9:E11").Select
Selection.FormatConditions.Add Type:=xlCellValue, Operator:=xlEqual, _
Formula1:="=1"
Selection.FormatConditions(Selection.FormatConditions.Count).SetFirstPriority
With Selection.FormatConditions(1).Interior
.PatternColorIndex = xlAutomatic
....
Hi is possible to change the cells that contain specific value to another without the use of looping or extra code (is there any built in function in Excel)?
for example in Excel 2007 I have a range (A1:B3)
A B C
1 -1 56 100
2 100 45 1
3 34 -999 0
now I want to change the cells' value to 7 if it c...