http://rase.paragonrels.com/publink/default.aspx?GUID=456daf07-e0d3-43ae-a894-2c10e7acd9c5&Report=Yes
I am trying to export this table into Excel and it is pasting into one column. When looking at the source code it does not look like a standard HTML table.
Is there a simple way to export this data into Excel so that columns and field names are intact?
Define simple? At a glance, this is the simplest method I can think of:
1) Highlight the data & paste it into Excel. I tested this & it outputs the data into one column.
2) Write a macro to parse the into table format.
As far as macros go, it shouldn't be too hard. How good are you with VBA?
Related
I have table-like data, and I'm looking to make a chart that displays that data. Since the data is that formula-generated from other data in the workbook, I don't know in advance how many lines it will have. I want to make a chart that adapts to this data.
Up to this part of the question, I could use named ranges to solve this.
The thing with the solution with named ranges is that it does not scale well when I have many of these charts. I have a Python script that generates CSV files that I import into my workbook as a sheet, and I don't want to have to know in advance how many of them there will be, or what they will be named. I only want to be able to import the CSV files into a new or existing sheet, and copy-paste the formulas from another working sheet, as well as be able to replace the existing CSV data with new data.
With named ranges, I would have to manually create a named range for each series of each sheet, and I would have to use the sheet's name so that the named range can be visible to the whole workbook (in order to analyze the data in a global sheet) without any name conflict. This is (more or less) acceptable when I do these steps myself now, but if I want to redo this in a few months, or if I pass my workbook to someone else, we wouldn't know why it's not working with a new sheet.
So is there any way to get this done without delving into VBA stuff? I'm using a recent version of Excel.
Per the comments, try using pivot tables, making your range extend far beyond expected results and filtering out "blanks" in your pivot and generate your chart from that. The default pivot chart is ugly but you can remove buttons and format as needed. Just remember to refresh your pivot during every update period.
I have one excel file in which I have multiple sheets with financial statements from different companies (called Databas.xlsx). The structures of these sheets are identical. Then I have another excel file that I wish to use to analyse these financial statements using charts. Thus, I must get data from the different sheets into my analysis file. Doing this from one sheet is no problem, as I can simply create a chart and mark the data I need from this sheet, so that the chart data range would be something like this:
=[Databas.xlsx]Kopparbergs!$C$3:$K$3
where "Kopparbergs" is the sheet name in Databas.xlsx. The problem I am facing is that I want to be able to change the sheet name that is put into this formula by writing the name in a cell (because that would enable me to change multiple charts at once). So just to clarify, in the formula written above, I want to be able to change the word "Kopparbergs" by writing text in a cell. If that is not possible, how would I accomplish this? That is, how do you create a chart that can change its content depending on a text in a cell that corresponds to a sheet?
So rather than using Indirect I think you need to use two named ranges for referencing when using a Chart.
This previous answer looks like a good guide to implement (not sure about etiquette of just copy & pasting previous answers so I'll just provide the link):
Dynamic chart range using INDIRECT: That function is not valid (despite range highlighted)
I have slightly different data but same format in one excel sheet.
Each data set is 5 columns. The first data set is column A-E, the second data set is column F-J, all the way through to DID-DIH
What I would like to do is to extract these to either their individual sheets or individual workbooks
Is this possible? Perhaps using VBA code?
Sorry I am an amateur trying analyse a massive data set
A good way to get started would be to hit the record macro button and copy the first columns manually. Then stop the recording and look in the VBA editor at the code produced. Wrap this in a loop and make the necessary changes to move columns etc. Have a go and post the code if you get stuck.
I have a template presentation on powerpoint.
I would like to replace automatically generic placeholders with the value I input in an linked excel worksheet.
I started looking at VBA at the begining of the week, I am not really yet familiar with the syntax, but I am optimistic I will find a way to understand it.
I have put "[ ]" everywhere I want a value input:
the excel sheet present itself like this:
I would like to have some pointers (first, to know if it is indeed possible in powerpoint) to get me started in the right direction.
Does it need to be a PublicSub()?
Am I writing the macro on Powerpoint or in Excel?
Can I use a fonction similar to LookupV to get the values to replace the placeholders?
I would imagine something like :
(side question : can I use regex inside of VBA?)
for each "\[.\]" '(or characterString.startsWith("[")
lookup characterString in excel, return column 3
end each
Would this be possible?
Thank you in advance, I really appreciate the help.
Found an approximate solution, but simpler than code writing.
Open Excel,
fill the values, and copy them onto the powerpoint presentation : use the special paste option between the cell (or cells/cell range) you want.
Choose the "paste the link" option together with object worksheet Excel, select Ok.
Both files will be linked. You can change the values in Excel, and they will change also in powerpoint. The formating is done on excel.
In order to update all the values in the powerpoint after changing them on excel, powerpoint needs to be re-run, and at the restart of the application, accept the updating box prompt.
I find this simpler than the other solutions.
I'm using the following Code to import a raw data extract (mysql; output format *.xlsx) from an excel sheet (source) into a sheet (target).
Importing Excel spreadsheet data into another Excel spreadsheet containing VBA
The target sheet is a excel-template contains some macros e.g. to allow users to easily sort data.
All is working very well, except that some data are malformed after import. Its really strange but due to any reason target is not an exact copy of the source sheet. Issues I've for example with date format and decimals.
I've tried several things to tweak the code but failed.
I believe that the way how the import in target sheet is handled by code is the reason why it doesnt work.
Now my question is if there exits any other way to import data from excel to excel.
Also I'm looking for a solution how I could solve the problem that excel formats all values automatically as text?
Any help would be highly appreciated.
Kind regards
Try replacing this line
targetSheet.Range("A1", "C10").Value = sourceSheet.Range("A1", "C10").Value
With this
sourceSheet.Range("A1", "C10").Copy
targetSheet.Range("A1", "C10").PasteSpecial
The former only copies the values. The latter copies both values AND its formatting, so things like date formats and number of decimals should be included as well.