How to Export Data from Excel to Doc, PDF, CSV, XML, vCard

<a href=Feature Image of Exporting Data" width="463" height="527" />

This is an overview.

1. Using the “Save As” Command to Export Excel Data to Text or CSV File

 Data for Exporting as CSV

This is the sample dataset. To export this data to a CSV file:

Clicking on File to Export Data from Excel

Clicking on Browse to Export

Select CSV to Export Data

Saved as CSV

Note: If your Workbook contains multiple worksheets, it will only export the data in the Active worksheet.

When this dialogue box is displayed, click OK to continue exporting.

Click on OK to Start Exporting

2. Exporting Data from Excel to PDF

2.1. Exporting the Full Excel Data to PDF

To export the whole worksheet into PDF file format:

Full Data

Click on Browse to Start Export

Select PDF in the Drop-down Menu

Full PDF

2.2. Export Part of Excel Data to PDF

Export the selection (B5:E15) to PDF.

Making PDF based on Selection

Select the Range to Export

Saving the PDF

The exported data will be displayed in a PDF.

PDF of the Selection

2.3. Using VBA Macros to Export the Full Excel Data to PDF

Enable Visual Basic

Note: Before pasting the code into module, change the file path in the name of the variable savePath. Otherwise, the code won’t run in the module.

Sub SaveAsPDF() ' Define variables Dim ws As Worksheet Dim savePath As String ' Set the current worksheet Set ws = ActiveSheet ' Specify the path and filename for the PDF ' Change "C:\Path\to\save\file.pdf" to your desired path and filename savePath = "C:\Users\SHUVO\Desktop\HP\HP_02\Output File\Full PDF by VBA.pdf" ' Save the worksheet as PDF ws.ExportAsFixedFormat Type:=xlTypePDF, Filename:=savePath, Quality:=xlQualityStandard ' Optional: Display a message when the PDF is saved MsgBox "PDF saved successfully!" End Sub

In the Macros dialog box:

Run the Macros

Export Data Completed

The PDF is created.

Exported Data in PDF File

3. Exporting Excel Sheets to Word

3.1. Using the Copy Paste Method

Export the dataset into Microsoft Word:

Data to Exported to Word

Clicking on Copy

Exported Data in Word

3.2. Using the Object Insertion Method

Export the dataset below to Word:

Data in Excel

Clicking on Object to Export Data from Excel

Click on Browse to Select the File

Select the File to be Exported

Click on OK

The dataset is exported from Excel to Word.

Exported Data

Note: If your Workbook has multiple worksheets. You can only import one sheet (Active sheet) at the time.

3.3. Embedding a Spreadsheet into a Word Document

To add this data table to a Word file:

Input Data

Clicking on Excel Spread Sheet

Excel Spreadsheet in Word

Output

4. Exporting Data from Excel to PowerPoint

Export the dataset to PowerPoint as a picture.

Data to be Imported to Powerpoint

Copy the Table

Import As Picture

Paste as Picture

This is the output.

Exported Data

5. Exporting Data from Excel to Google Sheets

Export this file:

Data

Create new Sheet

Click on Import

Click on Browse

Select the File

Click on Open Now to Start Exporting

The exported data will be displayed in the Google Sheet.

Exported Data in Sheets

Note:

If you have multiple sheets, it will upload the whole workbook.

Loss While Converting Excel Files to Google Sheets:

Formats Compatible with Google Sheets:

The supported formats of Excel files are:

.xls, .xlsx, .xlsm,.xlt, .ods, .csv, .tsv, .tab

6. Exporting Excel Sheets to XML

Export this dataset to XML.

Dataset for Exporting it to XML

X=Number of columns in your dataset.

A, B, C are the name of columns name.

Schema Code:

Schema Code for Exporting

Saving it as xml Export

Adding XML Maps

Adding Xml Export

Xml being added

Double Click Here

The first column will be displayed.

Appear as Table Column

Converted Table

Click on Export

The exported data will be displayed if you open the file in the Notepad.

Exported to XML

7. Exporting Data from Excel to a vCard

Convert the dataset into a VCF file or vCard.

Dataset to be Exported to vCard

Convert data into a CSV file:

The contact information is saved as a CSV file.

Saved the Data as CSV

Export data to a VCF file:

Open the Run App

Click on OK

Click on Import

Select CSV

Click on Browse

Click on Open

CLick on Next

Select E-mail Address

Finish the Field

Click on Export

Select Vcar and Click on Export

Click on OK.

Contacts being Exported

Click on Close

This is the output.

<a href=Exported Contacts as vCard" width="624" height="314" />

Click any VCF file, it will show the details about the person in a vCard.

Excel exported as vCard

8. Exporting Data from Excel to a SQL Server

The SQL Server Management Studiol’19 was used.

Data to be Exported to SQL Server

Export the data above into Database_A:

Export Data in this Database

To export data to the SQL server:

Clicking on Import Data

Click on Next

Clicking on Browse

Clicking On OK after Selecting the File

Click on NEXT.

Select Destination

 Checking the Connection

 Selecting the Database

Clicking on NEXT

 Check the Item to Export

Selecting the Worsksheet

Click on NEXT

Finishing the Wizard

 Closing the Wizard

Table in the Database

This will run the code and show the preview of the database that was exported from Excel.

Exported Data

How to Export Data from Excel and Create a Folder List with the File Explorer?

Create a folder for each name in the dataset using a batch file in Notepad.

Overview of Exporting and Creating Folders

=”MD” &” “&B6

Placing the Formula to add MD

Copy and Pasting it to Notepad

Create the folder

 Created Folders

Download Practice Workbook

Download the workbook.

Export Data.xlsm

Export Data from Excel: Knowledge Hub