Configure and link Excel to a delimited file for repeated use - excel

I am dumping data in a tab delimited file that I would like to view and analyze in Excel. But the file contents change frequently and I do not want to go through the importing steps every time, i.e. define delimiters, column names etc. Is there a way to save a link metadata in an Excel file so that you can skip the definition steps upon subsequent openings, i.e. that it knows that the first row are column names, it is tab delimited etc.?
Thanks

Yes, you can. Go through the Get External Data route. Once you set it up. All you have to do next is "Refresh Data". No macro needed.

Related

How do you guarantee that an incoming Excel file is from your original data source and not a fake?

I have a series of Excel files that I send out to customers. They fill them out and send them back with their info. How do I ensure that the excel files coming back in are the same ones I sent out and don't just share the same title and rows/column names?
The data could be falsified with the same title, row/columns. I ideally need some kind of fingerprint, artifact, or key attached to each excel file that ensures it came from my original data source.
I used to add white characters to headings as one simple trick.
Or I would put in cells odd names combined with dates in rows way below or columns far to the right.
Even inserted a name using insert name. You can also define names with vba and sometimes delete does not completely remove them - used that to hide passwords...

Combining CSVs in Power Query returning 1 row of data

I am trying to set up a query that will simply combine data from CSVs into a table as new files get added to a specific folder, where each row contains the data from a separate file. While doing tests with CSVs that I created in excel, this was very simple. After expanding the content column, I would see an individual row of data for each file.
In practice however, where I am trying to use CSVs that are put out from a proprietary android app, expanding the content column leads to 1 single row, with data from all files placed end to end.
Does this have something to do with there not being and "end of line" character in the CSVs the app is producing? If so, is there an easy way to remedy this without changing the app? If not, is there something simple and direct I can ask the developer to change which would prevent this behavior?
Thanks for any insight!

How to prevent excel from truncating numbers in a CSV file?

The first few lines of my CSV file look like this (when viewed from Notepad++):
Trace,Original Serial Number,New Serial number
0000073800000000097612345678901234567890,0054,0001
When I open this file in excel, I get this:
For some reason, excel is truncating the serial numbers and the trace number. I have tried changing the format to Text but that still doesn't work, as excel only sees the value up to the 6:
7.38000000000976E+34
If I change it to Number:
73800000000097600000000000000000000.00
What can I do? I only have 60 lines, so if I have to start over and some how recopy the text into excel I will, but I'm afraid saving it will change the format once again.
You shouldn't need to start over or alter the existing CSV. The fastest way might be to use Excel's text import wizard. In the data tab under Get External Data click From Text and select your CSV file.
The wizard that appears will let you tell Excel the data type of each "column" and you can tell it to use text for your barcode.
Excel is trying to "help" you by formatting the input values. To avoid this, do not double-click the file to open it. Instead, open the Data tab and in the Get External Data section, click on From Text
Then tell the Import Wizard that the fields are Text:
One solution that may work for you depending on the environment you consume the csv, you can add a nonnumeric character to the beginning and end (e.g. a "_") of the values. This will force Excel to recognize it as text. You can then remove the "_"s in your downstream environment (SQL, Databricks, etc.) or even keep them if they don't interfere with your reporting.

Excel Text to column autoupdate

I am importing a semicolon separated file into excel using web query and parsing this using the text to column feature in excel. However, this is an one time parsing and the values in the tabs aren't changing to reflect the changes in the original column (ie every time I do a refresh all, I want the delimiter separated columns to reflect the changes).
How do I automatically run the text to columns features every time there is a change in the original content?
As it is a text file already you could also use the Data > From Text option, that will automatically apply the text-to-columns functionality to it.
Now you can have it actively linked as Connection in your workbook and whenever it is updated text-to-column will be applied.

Different results exporting to CSV or Excel

I have a simple report that I want to export to a CSV file. There is only the detail line that is grouped by one field, no group header, and a group footer for totals. The problem is when I export to CSV format, the total row for a group is listed in front of every record?
If I export to Excel and then save as a CSV file, the total row is where it belongs. However one field is spread across 3 columns then those columns are "merged and centered" which adds two commas in the middle of the line. And one column is added at the beginning of the record and two at the end of the record, for 3 more extra commas.
It would be easy enough to write a macro to "clean up" the spread sheet and export as a csv file for my end users. However corporate "insecurity" will not allow the end users to have macros.
Any help, suggestions, pointers to where else to look greatly appreciated.
cheers
bob
The CSV generated by any standard reporting tool does a flat data structure and hence would repeat all data set.
The XLS generated by the reproting tools are typically to be opened in the XLS and its XLS default behaviour to put additional commas for every merged cell.
The best way is to create a report with a layout that has equal data length columns even for the header, ie while formatting the report do not put the header in the center with larger lenght, bold and italics etc, put it as the first column and match the lenght with the data in the detail record.
This way you would be able to create a report that does not look presentable in XLS but would give you required data in the CSV

Resources