Save In Excel With Commas
May 16, 2009Is there a way to save as an excel file containing a list of words inone column so when I open it in Notepad I get the words in one line separated by commas?
View 6 RepliesIs there a way to save as an excel file containing a list of words inone column so when I open it in Notepad I get the words in one line separated by commas?
View 6 RepliesI am working on a excel file that has a sheet that i want to convert to .csv. The sheet has formula's for the first three column that are warped an if statement that returns "" (blank) if certain conditions are not meet. However when i got to save the file as a csv i get a file with ",,,,,,," where there is no data. I would like to save csv and have only commas where this data.
Example
When i convert a sheet like
Firstname Lastname Password
Tim Cats Bo3n9x
it saves as
Firstname Lastname Password
Tim Cats Bo3n9x
,,,
,,,
,,,
In the .csv file.
Files i am current working on are attached.
I created a macro to save an active sheet as a CSV file. Two issues arise out of that effort. One is that I can't seem to get the environment variable right to allow any user to save the file to the root of their My Documents folder on their home directory in a domain environment. That way the template will work for everyone and requires no user intervention. Tried using the % with HOMEPATH, but I must somehow have the syntax off.
Secondly, the file being saved as a CSV file is creating a huge several megabyte file with empty lines of commas.
Sub Macro2()
Sheets("Results").Select
ActiveWorkbook.SaveAs Filename:= _
"\%HOMEPATH%My DocumentsTesting.csv", FileFormat:=xlCSVMSDOS, _
CreateBackup:=False
Application.WindowState = xlNormal
End Sub
Thought it should be CSV MS DOS file type, but that doesn't seem to work either. I only want to save the rows with data on the active sheet to a CSV file, which will not have all the extra lines of commas.
I have some data in cell A1, example would be "ABC,CDE,"
I was wondering if I can input a formula in B1 where it returns the text after the first comma, including the comma.
A1 would be ABC,
B1 would be CDE,
I'd like to keep the commas, and I also need to make this into an Excel formula if possible, rather than using Text to Columns
I have an excel file with a single column that looks like this:
A
HYU
NVT
FYR
NUH
GFR
TRF
GXA
AKL
My question is how do i export the data out of excel so that I can have a text file that reads like this:
A,HYU,NVT,FYR,NUH,GFR,TRF,GXA,AKL
Currently using Excel 2010 and looking for a macro that will export a selection (will be part of a column that I select) and export as an MS-DOS CSV file (no quotes around values, each row on different line) with 12 commas after each value in the selection.
Attached is an example of how I would like the output to appear, with the selected values only have four numbers in them. If possible, I would like a dialog box to appear for saving the file to a directory and name that I chose.
_________________Sample________________
1234,,,,,,,,,,,,
4567,,,,,,,,,,,,
9876,,,,,,,,,,,,
am using Excel 2010 and having issues trying to save a worksheet to a specified file location with the save date....
I have tried several posts form this forum and elsewhere and can't seem to get the macro to do what I want.....
I want to save a 'worksheet' from an open workbook that I use for updating information to the same file path as the workbook with the date the file saved...
I have an expense report, which was originally done in Excel 2003. It still prompts users to open as read only however if they select no, they are not prompted for the password, and it has allowed them to save, so when the next person opens it, they have the previous person's report instead of the clean workbook. I have tried everything to put a password onto it. I know this is really basic stuff, but maybe I am missing a step? I want the end user to be able to make all the changes they want in read only mode and then do a save as, but if the select No when prompted "Open as Read-only?" they should have to put a password in.
View 4 Replies View RelatedWhat I am trying to do is that I have an excel file with macros and it is a read-only file. In order for the user to save, I want them to only be able to save as a .xlsx file as it disables all macros. If for whatever reason, the user wants to save the file as another .xlsm file, they should be allowed but before they save, a "are you sure you want to save as .xlsm?" message should pop up.
All the options in the save as box should still be available in case they want to save in that particular format. Just that the .xlsx should be the default.
I have created a macro in excel 2010 which enable the file to save (extract) data into separate location and name. The vba code for macro is as follows: Question: How can I save this workbook with reference to the value containing in cell B2? (it is named temporary now - as defined in the code)
Sub aaa()
'
' aaa Macro
'
[Code].....
I have some daily text files in a folder (so about 30 of them each month), which in the end of month, I need to open them up in excel, format them so that I can use the information for my analysis.
I would like to create a macro, to quickly open them all up at once and save them each individually in .xls or .xlsm format.
I am new to VBA and after some research online, I was able to have the files open with the following code. but now I don't know how to proceed further to save them one by one with the same name but in .xls or .xlsm format.
Sub Opentxtfiles()
Dim MyFolder As String
Dim myfile As String
[Code].....
I would like to open all Excel files in a specific folder, insert a column after J and save the file as csv with the name a concatenation of text in A1 and B1.
View 2 Replies View RelatedI need to disable 'save as' in an excel file. I have read some previous topics but I cant understand it. Is there anyone who can explain it to me as detailed as possible?
View 9 Replies View RelatedTried a macro with no luck, I want to save workbook to PDF and have it named by the value in A3. I want the Dialog box to pop up so I pick the folder?
View 6 Replies View RelatedThe starting sheet has lot of text cells with empty columns and rows between them, without pattern. I need to do the following:
-Copy the original sheet and work on the renamed copy
-Remove all cells with bold font text (these are titles)
-Create a new sheet
-Transform the table to 1 column in the new sheet (no order required)
-Remove empty rows
-Save as CSV files with 2950 rows maximum each, with same name+number
i have a macro which copies data from each line, based on the row info copied.The current code i have is as follows:
Sub Macro1()
'
' Macro1 Macro
' Keyboard Shortcut: Ctrl+r[code].....
I have an Excel (.xlsm) that opens an existing PPT and uses VBA to modify several slides.
There are several shapes on each slide and my .xlsm has VBA that modifies those shapes.
(The slides have designs on them for different size business cards which get filled in with spreadsheet names,...)
Now I want to "select all" the shapes on a slide as a "group"(not sure that term is correct). Then I want to export that group as a .PNG image file. Save location can be the same folder location of the .xlsm file (doesn't really matter).
This is different than exporting each slide as a .PNG.(which I can already do). In this case the business card designs on each slide are different sizes. So I need the images to be just the size of the "group" on that slide.
The VBA code is within the .xlsm file (not the PPT)
Several posts show VBA code for within the .pptm file that works fine if using just a PPT
However that code doesn't seem to work when I put it in the .xlsm file to drive the image creation from Excel.
PC with latest of all software.
I am exporting a multiline listbox entry (with 14 columns, I'll expand that later) by DoubleClick from one UserForm to another.
View 1 Replies View RelatedI am trying to edit the code below to save in .xls instead of .xlsm. Also, I need to disable the compatibly checker.
[Code]....
I have all my data on an Excel2000 spreadsheet and want to save it or export it out as text with just a space between each piece of data.
View 12 Replies View RelatedI want to know if it is possible to launch a blank notepad from an existing excel spreadsheet and then type relevant "history notes" into notepad and save.
I am creating a manual spreadsheet for the company I am working for which is being used for Maintenance Planning / Scheduling and creating of work orders. Once the work order has been raised and the job has been completed it then needs to be closed out on the spreadsheet and any relevant notes entered in. I am hoping to be able to have a link that opens notepad by the click of a button within the spreadsheet and it allows the user to record any notes against that work order and save. These notes can then viewed by future users.
I have excel contains multiple sheet. I want to save all sheets as in different workbook in specific folder.
e.g. Workbook "Report" has 3 worksheet i.e. A, B & C By running macro all 3 sheets should be saved as different workbook on "C:Report(folder)"
C:Report(folder)A.xls
C:Report(folder)B.xls
C:Report(folder)C.xls
I have a scrip that i use to safe email attachments that works and is as follow.
Code:
Public Sub saveAttachtoDisk(itm As Outlook.MailItem)
Dim objAtt As Outlook.Attachment
Dim saveFolder As String
[Code]....
Now the problem is that the email comes with 2 excel email attachments and i only want to save the one that has a name + date stamp.
I need to create a macro that will allow me to save a PDF from an XL file I am creating by running a report out of Access. This report yields a workbook with 2 sheets in it. The first tab (sheet) called "Mishkon" and the second called "Women's League". I need to save these reports separately as PDFs and they need to be saved in seperate locations. The first sheet (Mishkon) needs to be saved here: \OSOFSDataDayHabMishkon . The second sheet needs to be saved here: \OSOFSDataDayHabWomen's League . Here is the twist... Both sheets need to take their name from their G3 cells. I have Excel 2010 and dont want to print from my Adobe PDF printer. I would like to save as a PDF so I can run it off of computers that dont have the Adobe PDF printer installed.
View 5 Replies View RelatedI'd like to record a macro that allows me to take the current file "file.csv" and save it as "file.xlsx"
I can't get the variable right (just messing around in VBA to have it get the file name and save it as a different format (csv to xlsx)
I've tried:
Function GetFullName() As String GetFullName = ThisWorkbook.FullName End Function
I'm trying to solve when hitting the Save/Close button on my Userform.
Give the User the option to Save As the toolGive the User the option to either exit or return after Save AsIf Exit - hide all but the first worksheet (in case they open with Macros DisabledClose/Exit
My current issue is when I click the button and choose Exit Yes then the form and workbook close, but Excel is still open. Is there a way to have Excel fully close if no other workbooks are open?
Code:
Private Sub cmbSaveAs_Click()
Dim sFilename
If MsgBox("Save the file?", vbYesNo) = vbYes Then
sFilename = Application.GetSaveAsFilename(fileFilter:="Excel Macro-Enabled Workbook (*.xlsm),*.xlsm")
[Code] .........
I am running Excel 2011 on Mac OS X. I am trying to save a file (.xls) to a server (Autumn). I have tried several configurations to try to get the file saved properly. File name is "Testfile.xls"
1. folderpath = "Autumn:Tim:TestFolder:" & filename --Activeworkbook.Saveas filename:=folderpath
2. folderpath = "Tim:TestFolder:" & filename Activeworkbook.Saveas filename:=folderpath
3 Activeworkbook.Saveas folderpath
When I try this, I get an Error 1004 indicating that it cannot find the file. Do I need to eliminate the .xls and then specify that when I do the saveas?
I have a script that opens the workbook Excel, and save him as PDF format. But my script saves all sheets in a book. I need to save only sheets with name "Cnt1", "Cnt2" .... "CntX".
Code:
Dim xlObj, objArgs, xlWB, xlSH
Set xlObj = CreateObject("Excel.Application")
Set objArgs = WScript.Arguments
file = objArgs.item(0)
fileToSave = objArgs.item(1)
set xlWB = xlObj.Workbooks.Open(file)
xlWB.ExportAsFixedFormat 0, fileToSave , 0, 1, 0,,,0
xlWB.close False
xlObj.quit
I've been working on this problem on and off for a number of months now and have just about got it sussed so thought I'd share it with you as it has mostly been down to postings on this board that I've got it in the end.
Thanks especially to 'biggoan' for his post: http://www.mrexcel.com/board2/viewto...136&highlight=
Anyway, this seems to avoid the need for a class module but does need you to install the Acrobat Distiller object references in Tools...References in the VBA editor.
You also need to go into the printer properties of the your Adobe PDF 'Printer' and under Printing Preferences...Adobe PDF Settings deselect the Do not send fonts to "Adobe PDF" option. Why, who knows!
Private Sub Create_PDF()
'Created by Dom Hill with considerable asistance from Biggoan and Mr Excel
Dim tempPDFFileName As String
Dim tempPSFileName As String
Dim tempPDFRawFileName As String
Dim tempLogFileName As String
Sheets("Sales Data").Activate
tempPDFRawFileName = "C:" & Range("A1").Value
'Define the postscript and .pdf file names.
tempPSFileName = tempPDFRawFileName & ".ps"
tempPDFFileName = tempPDFRawFileName & ".pdf"
tempLogFileName = tempPDFRawFileName & ".log"
' Print the Excel range to the postscript file
ActiveSheet.PrintOut Copies:=1, preview:=False, ActivePrinter:="Adobe PDF", printtofile:=True, Collate:=True, prtofilename:=tempPSFileName
'Create PDF File
Dim myPDFDist As New PdfDistiller
myPDFDist.FileToPDF tempPSFileName, tempPDFFileName, tempShowWindow
'Delete PS File
Kill tempPSFileName
Kill tempLogFileName
End Sub
Not sure why the macro creates a log file but if you know more about VBA then you probably would.
I created a financial model in sheet with a macro. The model works as designed. And the workbook can be saved with smaller steps. But with big steps that contains about 250,000 formulas, it seemed to take forever to have the work book saved, I have to canceled it after about 45 minutes. I tried it on different machines and all have the same problems.
View 9 Replies View Related