Spreadsheet to multiple txt files with specified names - excel

I'm looking for a way to export text from a cells in a spreadsheet into multiple '.txt' files. The trick is that each .txt file would contain text from one cell from specified column and it would be named using text from one cell from other specified column.
Example Spreadsheet:
Names text extra-info
John 15684 Spring
Sally 54645 Autumn
Mark 45545 Winter
From this example three .txt files should be created.
Named:
John.txt
Sally.txt
Mark.txt
and containing relevant numbers. ex 15684 inside Jonh.txt.
The spreadsheet is a google spreadsheet at the moment but we have access to open office and excel as long as one of them can do that job.

This should be pretty straightforward. Do you know how to begin writing an App Script? I don't mean to sound condescending, but since you didn't post code, I don't know exactly where you need help.
I'd use the Spreadsheet service to gather the data from your spreadsheet:
https://developers.google.com/apps-script/reference/spreadsheet/range#getValues()
Then you'd iterate through each row and create a new file using the createFile() method in DriveApp for the contents:
https://developers.google.com/apps-script/reference/drive/drive-app#createFile(String,String,String)
All of the resulting files will be in the root folder of Drive.

Related

Match multiple columns of Excel and highlight if the value is a complete or partial match upto certain characters

I have two Excel files Source File and Working File. Source file has name of organisations which are blacklisted. The Working File has 11 columns in which the name of organisations are mentioned. I need to complete match or Partial Match upto certain characters in the Working File. If the Working File has complete or partial match those values to be highlighted with Red Background in the Working File. I tried some VBA codes but not having a working solution. I am just a beginner need help on this please.
Load the entries of the Source File in an array, go to the Working file and check Row by Row for each column, if the cell content is listed in the array. If yes, mark it red.

Convert excel 1 column to multiple csv column

I have question
There are excel data like this
input file
More than 500 person
I wanna convert data to csv
expected csv result
The data age is not 100% the second row, some may be third row. Name can be duplicate data.
I’m really confused. Can i use excel feature to do this or any way like coding?
I upload file : https://ufile.io/rxe1l
Add name, age, add etc as column in excel and export as .csv.
In your Excel workbook, switch to the File tab, and then click Save As. Alternatively, you can press F12 to open the same Save As dialog.
In the Save as type box, choose to save your Excel file as CSV (Comma delimited).
Please simply follow this link conversation excel into csv

Excel comparison for Text in different coloumns

I have two excel files with the comments data from a survey. One file has all the comments from all the departments and then the other file has it broken down for different departments.
I have categorized the comments in the master file (the one with all comments) and I want to now find the comment within each department in the other file. Will the following code work?
I found a VB Script on the Microsoft Support website
https://support.microsoft.com/en-us/kb/213367
If not is there any other way I can do this other than manually?
=IF(ISERROR(MATCH(A1,$C$1:$C$5,0)),"","MATCH")
This worked. It compared all the values in Coloumn C with Column A and then returned the string "MATCH".

Making an excel readable file?

Is there any information regarding being able to use a toString or a separate method to write to a file and that file can actually be used and opened in excel, therefor creating excel cells etc? Or is this not a well known practice.
You should try using a Comma Separated Values file, or CSV.
These files can be opened in Excel with columns and rows.
Example:
Title,Author,FirstPublished,ISBN,
The Communist Manifesto,Marx K.,1887,9780140447576,
The Black Swan,Taleb N.,2008,9780812979183,
When Money Dies,Fergusson A.,1975,9781906964443,
Liar's Poker,Lewis M.,1989,9780340839966,
Paradox,Al-Khalili J.,2012,9780552778060,
Cosmos,Sagan C.,1981,9780349107035,
An Unquiet Mind,Jamison K.,1995,9780330528078,
Principia Mathematica,Russell B.,1913,9781178292992,
Elements,Euclid,-300,9781420934762,
The Principia,Newton I.,1687,9781607962403,
Relativity,Einstein A.,1920,9781891396304,
The fields on the first line are the columns, and the fields below are the rows (one on each line).

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