Hi all,
Here is my question... I am using python in Linux to automate an excel. I have finished writing data into excel by using pyexcelerator package.
Now comes the real challenge. I have to add another tab to the existing sheet and that tab should contain the macro run in the first tab. All these things should be automated. I googled a lot and found win32come to do a job in macro, but that was only for windows.
Anyone have any idea of how to do this, or can you guide me with few suggestions.
Thanks in advance.
I've spent hours scouring the net for anything to do with VBA calling data from the web in excel and nothing provides a tutorial on how to do so, only complicated examples un-related to what I want to do.
I want to pull data from either a .html or .xml site, doesn't matter, via Excel and find specific points in that data. I can find specific points but don't know how to get the data or scroll through multiple lines. I've done this exact sort of thing in mIRC (sort of C code).
http://eve-central.com/home/quicklook.html?typeid=438
http://api.eve-central.com/api/quicklook?typeid=438
Those are two examples, using roughly the same data I'd like to retrieve. It'd be FAR more specific with at most 100 or so different values.
I'd like to be TAUGHT how to do it, not given the code to do it, or if you must explain each part with comments in-depth please.
Thanks
Nick
I need to create a script that extracts some data from a complex Excel 2003 file (with multiple Sheets and different tables inside a single sheet) and produces different XML files that need to be validated against a given XSD file.
My preferred language is Python;
to create and validate XML files i would go with lxml.
What do you suggest for parsing XSL files?
Is xlrd the right tool to use for complex Excel files?
Or do i need to convert all the sheets in CSV manually, and read files line by line, splitting and getting data?
I accept C#, VB6 suggestions too.
Hi,
I am trying to create dynamic excel sheet, with the help of php using XML Spreadsheet.
But when I try to open the dynamically created excel sheet I keep on getting error that says 'Unable to load worksheet, problem with worksheet settings'. When I try to look at the log file it had created it shows the below text,
XML ERROR in Worksheet Setting
REASON: Bad Value
FILE: C:\Documents and Settings\UserName\Local Settings\Temporary Internet Files\Content.IE5\5XZ039FS\output[3].xls
GROUP: Worksheet
TAG: Table
ATTRIB: ExpandedRowCount
VALUE: 4
Can anybody tell what does the above error mean and how do I remove it?
I'm working on a feature to export search results to a CSV file to be opened in Excel. One of the fields is a free-text field, which may contain line breaks, commas, quotations, etc. In order to counteract this, I have wrapped the field in double quotes (").
However, when I import the data into Excel 2007, set the appropriate delimiter, and set the text qualifier to double quote, the line breaks are still creating new records at the line breaks, where I would expect to see the entire text field in a single cell.
I've also tried replacing CR/LF (\r\n) with just CR (\r), and again with just LF (\n), but no luck.
Has anyone else encountered this behavior, and if so, how did you fix it?
TIA,
-J
I am trying to write an excel if statement. I am new to using all the extra functionality Excel has. I am using a function called importXML(). I am trying to check whether a function I am using generates a "#VALUE!" error as follows:
if(
importXML(B1,C1)!="#VALUE!" //check if no error generated,
importXML(B1,C1)//if no error is generated, use these cells in the function
importXML(A1,C1)//else use these cells in the function
)
Is this possible? Am I using excels if statement correctly to check for errors?
good afternoon everyone :)
I got sucha dilemma! (hate being new at stuff!)
What my problem is is that I have a project that is in full design mode swing right now. I built it using the Windows form..
Anyways, on one of my forms..that I already started building (very painstakingly)..
Minds have changed and now what needs to be on that form is either a full excel 2003 workbook..or at the very least..excel worksheet.
The problem is that I have not been using studio 2008 for long..and coding experience shows the same.
Can someone please tell me how the heck I can put a worksheet or a workbook on that form without starting my whole project over using office forms?
Please..go slow with this newbie cuz i really dont know anything and Jargon is confusing me even more :(
thanxxXXX :)
HI all !!
I am working on excel template+ Vsto application.
I have assign various custom validations and formats for various cells.
But whenever i copy & paste something into the cell,these validations do not work (fails completely),
is there any way so i can disable ( Ctrl+V ) Paste options from the excel template.
I think it can be implemented in vba macros.
But i m not sure about it.
Thank you in advance.
Sangram Nandkhile.
I need to read an excel file and loop through the rows. I used the below code to read the excel file. But I am not getting the entire row, inseatd of getting the column values.
try
{
OleDbConnection objConnection = new OleDbConnection(strConnectionString);
string queryString = string.Format("Select * from [{0}$]", strSheetName, objConnection);
OleDbCommand command = new OleDbCommand(queryString, objConnection);
objConnection.Open();
OleDbDataReader reader = command.ExecuteReader();
while (reader.Read())
{
var val1 = reader[0].ToString(); //Here I want to get each row
}
reader.Close();
}
catch (Exception ex)
{
Console.WriteLine(ex.Message);
}
I need to check if the row is empty or not, if not empty, I need to serach for some values in a particular column.
Thanks for your help
I have created a application in c# , it reads excel file and after checking some conditions, it select a row to be written in another Excel File.
Everything is working fine, but i need to end the file with the DateTime.Now.ToString().
string date = DateTime.Now.ToString();
ExcelWorkSheet2.Cells[newFileRow, 1] = date;
When I see the file created, it shows "########" symbol instead of actual date. When I select that cell , it changes to correct date format.
What may be going wrong?
Ok i have a Excel import written. It uses excel automation to go through all the records and get the job done. BUt how would you do it if you had to do it?
Would you use SSIS?
Would You use a Dataconnection?
I am really confused as to the best way to get this done properly. So that it doesn't slow down the actual application for the other clients when one client does an import.
Thanks
I have a set of data that shown below on excel.
R/V(208,0,32) YR/V(255,156,0) Y/V(255,217,0)
R/S(184,28,16) YR/S(216,128,0) Y/S(209,171,0)
R/B(255,88,80) YR/B(255,168,40) Y/B(255,216,40)
And I want to separate the data in each cell look like this.
R/V 208 0 32
R/S 184 28 16
R/B 255 88 80
what is the function in excel that I can use for this case.
Thank you in advance.
I have to average grades based on each objective for a new report card we have to complete this year. For example Column one has students names, each additional column will have the objective associated with the assignment. I would like to move the entire column to another sheet for each objective. Is there a formula or macro that will do that. For example objective 3.1A is in columns 2, 5, and 7, objective 3.2B is located in columns 1, 4, 10, and 12, objective 3.4c is in column 3, 6, 9, and 11. I would like to have a spreadsheet for each objective.
I have a spreadsheet structured as follows:
Summary section at the top
Detail section on the bottom
Summary section summarizes the detail section which is filtered using auto filters
There are ten products that all need to be printed individually, but I want the page footer to show the overall page position of all the print jobs and the total number of pages.
That is probably not clear. So for example, if I print the two page Product A view it will print page 1 of 2 and 2 of 2. If I print the one page Product B it will show page 1 of 1. What I want is to print both and have Product A show Page 1 of 3, Page 2 of 3, and Product B be Page 3 of 3. Is there any way to accomplish this?
I keep a log of phone calls like the following where the F column is LVM = Left Voice Mail, U = Unsuccessful, S = Successful.
A1 1 B1 Smith C1 John D1 11/21/2012 E1 8:00 AM F1 LVM
A2 2 B2 Smith C2 John D2 11/22/2012 E1 8:15 AM F2 U
A3 3 B3 Harvey C3 Luke D3 11/22/2012 E1 8:30 AM F3 S
A4 4 B4 Smith C4 John D4 11/22/2012 E1 9:00 AM F4 S
A5 5 B5 Smith C5 John D5 11/23/2012 E5 8:00 AM F5 LVM
This is a small sample. I actually have over 700 entries. In my line of work, it is important to know how many unsuccessful (LVM or U) calls I have made since the last Successful one (S). Since values in the F column can repeat, I need to take into consideration both the B and C column.
Also, since I can make a successful call with a client and then be trying to contact them again, I need to be able to count from the last successful call. My G column is completely open which is where I would like to put a running total for each client (G5 would = 1 ideally while G4 = 0, G3 = 0, G2 = 2, G1 = 1 but I want these values calculated automatically so that I do not have scroll through 700 names).
In one column I have a bitstring encoded as a string type. In a different column I wish to have the same bits (potentially starting with a leading 0), but as a binary value type. Ultimately, I want to have it in hex representation (string or hex type, doesn't matter) in a third column.
How is this done? Do I have to program something for it or is there a faster way?
Input cell contains the following string: 00000100100011000100100011
I wish to obtain the string: 0123123
I'm trying to create a macro that will copy data from a data entry sheet into a summary sheet. The entry sheet is going to be cleared daily so I can't use a formula just to reference it. I want the user to be able to enter a date, run a macro, and have the macro copy the data from the entry sheet into the cells for the corresponding date on the summary sheet. I've looked around and found bits and pieces of how to do this but I can't put it all together.
Update:
Thanks to the information below I was able to find some additional data. I have a pretty crude macro that works if the user manually selects the correct cell. Now I just need to figure out how to automatically select the current cell relative to the current date.
Sub Update_Deposits()
'
' Update_Deposits Macro
'
Dim selectedDate As String
Dim rangeFound As Range
selectedDate = Sheets("Summary Sheet").Range("F3")
Set rangeFound = Sheets("Deposits").Cells.Find(CDate(selectedDate))
Dim Total1 As Double
Dim Total2 As Double
Dim Total3 As Double
Dim Total4 As Double
Dim Total5 As Double
Total1 = Sheets("Summary Sheet").Range("E6")
Total2 = Sheets("Summary Sheet").Range("E7")
Total3 = Sheets("Summary Sheet").Range("E8")
Total4 = Sheets("Summary Sheet").Range("E9")
Total5 = Sheets("Summary Sheet").Range("E10")
If Not (rangeFound Is Nothing) Then
rangeFound.Offset(0, 2) = Total1
rangeFound.Offset(0, 3) = Total2
rangeFound.Offset(0, 4) = Total3
rangeFound.Offset(0, 6) = Total4
rangeFound.Offset(0, 7) = Total5
End If
'
End Sub
This version will find the first value on the page and fill in values:
Sub Update_Deposits()
'
' Update_Deposits Macro
'
Dim selectedDate As String
Dim rangeFound As Range
selectedDate = Sheets("Summary Sheet").Range("F3")
Set rangeFound = Sheets("Deposits").Cells.Find(CDate(selectedDate))
Dim Total1 As Double
Dim Total2 As Double
Dim Total3 As Double
Dim Total4 As Double
Dim Total5 As Double
Total1 = Sheets("Summary Sheet").Range("E6")
Total2 = Sheets("Summary Sheet").Range("E7")
Total3 = Sheets("Summary Sheet").Range("E8")
Total4 = Sheets("Summary Sheet").Range("E9")
Total5 = Sheets("Summary Sheet").Range("E10")
If Not (rangeFound Is Nothing) Then
rangeFound.Offset(0, 2) = Total1
rangeFound.Offset(0, 3) = Total2
rangeFound.Offset(0, 4) = Total3
rangeFound.Offset(0, 6) = Total4
rangeFound.Offset(0, 7) = Total5
End If
'
End Sub
Person A needs £115, Person D £234 and Person G £789, but how do I SUM that and get it to show on the same ROW as the subtotal?
The Rows are subscription names.
The Value field holds the Cost per subscription.
the Columns holds the name of the person who receives the subscription.
I have GROUPED on YEAR & MONTH, and have a subtotal that shows me how much each person will need to pay each month for all their subscriptions, but I need a figure showing me the total of all the subscriptions per month.
I've tried adding calculated fields, but I want to SUM the subtotals so I'm struggling to see the field I need to use. I've tried Grand Totals but that SUMS all rows and I really only want SUM the Subtotal Total Row.
I need a nice neat report that my managers won't go white at when looking at it...to many numbers = fear and confusion.
Anyway it got messy, so I've come for help.
Cheers
Mike.
I'm creating a large sheet in Excel with several categories on the first three columns.
But since I have so many columns I can no longer see those first three columns when filling in new ones.
So how can I keep several columns always visible while scrolling in Excel?
Note: this is for Excel 2007 or higher
How can I pair two rows on a spreadsheet, so that for each data entry I can sort the matrix but the pair of rows moves as a single list of data, retaining the structure of the two rows?
For example:
Original entry
A1,1 B1,1 C1,1 D1,1
A1,2 B1,2 C1,2 D1,2
A2,1 B2,1 C2,1 D2,1
A2,2 B2,2 C2,2 D2,2
Sorted reverse order
A2,1 B2,1 C2,1 D2,1
A2,2 B2,2 C2,2 D2,2
A1,1 B1,1 C1,1 D1,1
A1,2 B1,2 C1,2 D1,2
I have a list with three columns A, B, and C. The first two columns are complete (A and B), while the third (C) has many blanked fields.
What I want to do is replace all the blank fields in Column C with the same value form cell A in the same row.
The List contains over 2000 records, of which 65% have a blank Column C value, so I would like to use a formula/function.
Below is an example of what I have and what I want to do (on a much smaller scale)
I have report in Excel format (Excel 2007) from Accountant department - and it has Groupping by Rows.
+ Client 1 300$ (group Bills by Client)
|-- BIll 1 100$
|-- Bill 2 200$
So in Excel It looks like this in plain rows format (If I ungroup those rows):
1 Client1 300$
2 Bill1 100$
3 Bill2 200$
1,2,3 - row numbers.
So I cant Pivot these data to get Client-by-Bill-SUm report, because rows with Client Name are not Connected (that is necessary for Pivoting info by Client, Bills) with Bills rows after UnGroupping.