{"id":12167,"date":"2012-11-20T10:59:37","date_gmt":"2012-11-20T10:59:37","guid":{"rendered":"http:\/\/www.learnexcelmacro.com\/?p=2591"},"modified":"2012-11-20T10:59:37","modified_gmt":"2012-11-20T10:59:37","slug":"save-an-excel-sheet-as-pdf","status":"publish","type":"post","link":"https:\/\/vmlogger.com\/excel\/2012\/11\/save-an-excel-sheet-as-pdf\/","title":{"rendered":"How to Export an Excel Sheet as PDF file"},"content":{"rendered":"

Dear Readers,
\n
\nIn this article you are going to learn How to save an Excel Sheet as pdf file<\/font>. Many a times we generate certain reports in an Excel Sheet but while sending that report to your boss, you want that to be saved in a PDF form. In such case you can simply save your Whole Sheet or a particular range from that sheet in PDF form. You can also Enter headers and footers in the Page Layout view in the Excel. <\/p>\n

1. Code which export your active excel sheet as PDF<\/h2>\n
\n\nWith ActiveSheet\n    .ExportAsFixedFormat _\n    Type:=xlTypePDF, _\n    Filename:=\"C:\\Users\\Vish\\File_Name.pdf\", _ \n    Quality:=xlQualityStandard, _\n    IncludeDocProperties:=True, _\n    IgnorePrintAreas:=False, _\n    OpenAfterPublish:=False \nEnd With\n\n<\/code><\/pre>\n

<\/p>\n

2. Code which export any specific Sheet as PDF<\/h2>\n
\n\nWith Sheets(\"Your Sheet Name\")\n    .ExportAsFixedFormat _\n    Type:=xlTypePDF, _\n    Filename:=\"C:\\Users\\Vish\\File_Name.pdf\", _ \n    Quality:=xlQualityStandard, _\n    IncludeDocProperties:=True, _\n    IgnorePrintAreas:=False, _\n    OpenAfterPublish:=False \nEnd With\n\n<\/code><\/pre>\n

<\/p>\n

3. Export a Specific Range from a Sheet as PDF<\/h2>\n
\n\nWith Sheets(\"Your Sheet Name\").Range(\"A1:F15\")\n    .ExportAsFixedFormat _\n    Type:=xlTypePDF, _\n    Filename:=\"C:\\Users\\Vish\\File_Name.pdf\", _ \n    Quality:=xlQualityStandard, _\n    IncludeDocProperties:=True, _\n    IgnorePrintAreas:=False, _\n    OpenAfterPublish:=False ' \nEnd With\n\n<\/code><\/pre>\n

<\/p>\n

Important:<\/h2>\n

Above code first split your Excel Sheet in Page View Layout as shown below and then it exports it in PDF form. Therefore, if you want to see how it should look like in PDF, you can go in Page View layout in Excel and see. You can also adjust the Margin in the layout. Also in the Layout View you can Add the Header and many more things like Page Number, Date Time etc which will not be seen in Normal View. But if you generate the pdf from that then those settings will reflect in your PDF file.
\n
\n

\"Export

Export Excel as PDF - Layout<\/p><\/div>
\n
\nThis is how your PDF file look like after exporting your Excel Sheet as PDF.
\n
\n

\"Export

Export Excel as PDF<\/p><\/div><\/p>\n<\/span>","protected":false},"excerpt":{"rendered":"

Dear Readers, In this article you are going to learn How to save an Excel Sheet as pdf file. Many a times we generate certain reports in an Excel Sheet but while sending that report to your boss, you want that to be saved in a PDF form. In such case you can simply save […]<\/p>\n","protected":false},"author":45,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","footnotes":""},"categories":[1246,1676,1682],"tags":[],"class_list":["post-12167","post","type-post","status-publish","format-standard","hentry","category-macro","category-excel-tips","category-popular-articles"],"yoast_head":"\nHow to Export an Excel Sheet as PDF file - Let's excel in Excel<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/vmlogger.com\/excel\/2012\/11\/save-an-excel-sheet-as-pdf\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Export an Excel Sheet as PDF file\" \/>\n<meta property=\"og:description\" content=\"Dear Readers, In this article you are going to learn How to save an Excel Sheet as pdf file. Many a times we generate certain reports in an Excel Sheet but while sending that report to your boss, you want that to be saved in a PDF form. In such case you can simply save […]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/vmlogger.com\/excel\/2012\/11\/save-an-excel-sheet-as-pdf\/\" \/>\n<meta property=\"og:site_name\" content=\"Let's excel in Excel\" \/>\n<meta property=\"article:publisher\" content=\"http:\/\/www.facebook.com\/vmlogger\" \/>\n<meta property=\"article:author\" content=\"http:\/\/www.facebook.com\/vmlogger\" \/>\n<meta property=\"article:published_time\" content=\"2012-11-20T10:59:37+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/learnexcelmacro.com\/wp\/wp-content\/uploads\/sites\/11\/2012\/11\/Export-Page-Layout.png\" \/>\n<meta name=\"author\" content=\"Vishwamitra Mishra\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/www.twitter.com\/learnexcelmacro\" \/>\n<meta name=\"twitter:site\" content=\"@learnexcelmacro\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Vishwamitra Mishra\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/vmlogger.com\/excel\/2012\/11\/save-an-excel-sheet-as-pdf\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/vmlogger.com\/excel\/2012\/11\/save-an-excel-sheet-as-pdf\/\"},\"author\":{\"name\":\"Vishwamitra Mishra\",\"@id\":\"https:\/\/vmlogger.com\/excel\/#\/schema\/person\/7500a107b0b2d35a8492acf0d11fc8e5\"},\"headline\":\"How to Export an Excel Sheet as PDF file\",\"datePublished\":\"2012-11-20T10:59:37+00:00\",\"dateModified\":\"2012-11-20T10:59:37+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/vmlogger.com\/excel\/2012\/11\/save-an-excel-sheet-as-pdf\/\"},\"wordCount\":260,\"commentCount\":10,\"publisher\":{\"@id\":\"https:\/\/vmlogger.com\/excel\/#\/schema\/person\/7500a107b0b2d35a8492acf0d11fc8e5\"},\"image\":{\"@id\":\"https:\/\/vmlogger.com\/excel\/2012\/11\/save-an-excel-sheet-as-pdf\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/vmlogger.com\/excel\/wp-content\/uploads\/sites\/11\/2012\/11\/Export-Page-Layout.png\",\"articleSection\":[\"Excel Macro\",\"Excel Tips\",\"Popular Articles\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/vmlogger.com\/excel\/2012\/11\/save-an-excel-sheet-as-pdf\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/vmlogger.com\/excel\/2012\/11\/save-an-excel-sheet-as-pdf\/\",\"url\":\"https:\/\/vmlogger.com\/excel\/2012\/11\/save-an-excel-sheet-as-pdf\/\",\"name\":\"How to Export an Excel Sheet as PDF file - Let's excel in Excel\",\"isPartOf\":{\"@id\":\"https:\/\/vmlogger.com\/excel\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/vmlogger.com\/excel\/2012\/11\/save-an-excel-sheet-as-pdf\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/vmlogger.com\/excel\/2012\/11\/save-an-excel-sheet-as-pdf\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/vmlogger.com\/excel\/wp-content\/uploads\/sites\/11\/2012\/11\/Export-Page-Layout.png\",\"datePublished\":\"2012-11-20T10:59:37+00:00\",\"dateModified\":\"2012-11-20T10:59:37+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/vmlogger.com\/excel\/2012\/11\/save-an-excel-sheet-as-pdf\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/vmlogger.com\/excel\/2012\/11\/save-an-excel-sheet-as-pdf\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/vmlogger.com\/excel\/2012\/11\/save-an-excel-sheet-as-pdf\/#primaryimage\",\"url\":\"https:\/\/vmlogger.com\/excel\/wp-content\/uploads\/sites\/11\/2012\/11\/Export-Page-Layout.png\",\"contentUrl\":\"https:\/\/vmlogger.com\/excel\/wp-content\/uploads\/sites\/11\/2012\/11\/Export-Page-Layout.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/vmlogger.com\/excel\/2012\/11\/save-an-excel-sheet-as-pdf\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/vmlogger.com\/excel\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Excel Macro\",\"item\":\"https:\/\/vmlogger.com\/excel\/macro\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"How to Export an Excel Sheet as PDF file\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/vmlogger.com\/excel\/#website\",\"url\":\"https:\/\/vmlogger.com\/excel\/\",\"name\":\"Let's excel in Excel\",\"description\":\"Let's share knowledge\",\"publisher\":{\"@id\":\"https:\/\/vmlogger.com\/excel\/#\/schema\/person\/7500a107b0b2d35a8492acf0d11fc8e5\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/vmlogger.com\/excel\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/vmlogger.com\/excel\/#\/schema\/person\/7500a107b0b2d35a8492acf0d11fc8e5\",\"name\":\"Vishwamitra Mishra\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/vmlogger.com\/excel\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/vmlogger.com\/excel\/wp-content\/uploads\/sites\/11\/2022\/07\/avataaars-1.png\",\"contentUrl\":\"https:\/\/vmlogger.com\/excel\/wp-content\/uploads\/sites\/11\/2022\/07\/avataaars-1.png\",\"width\":528,\"height\":560,\"caption\":\"Vishwamitra Mishra\"},\"logo\":{\"@id\":\"https:\/\/vmlogger.com\/excel\/#\/schema\/person\/image\/\"},\"description\":\"My name is Vishwamitra Mishra. Friends Call me Vishwa. I hold a Bachelor\u2019s Degree in Computer Science from D.A.V.V. Indore & currently working as a Technical Lead having over 7 years of experience.\",\"sameAs\":[\"http:\/\/www.learnexcelmacro.com\",\"http:\/\/www.facebook.com\/vmlogger\",\"https:\/\/x.com\/https:\/\/www.twitter.com\/learnexcelmacro\",\"https:\/\/www.youtube.com\/c\/VMLogger\"],\"url\":\"https:\/\/vmlogger.com\/excel\/author\/vishwamitra\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"How to Export an Excel Sheet as PDF file - Let's excel in Excel","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/vmlogger.com\/excel\/2012\/11\/save-an-excel-sheet-as-pdf\/","og_locale":"en_US","og_type":"article","og_title":"How to Export an Excel Sheet as PDF file","og_description":"Dear Readers, In this article you are going to learn How to save an Excel Sheet as pdf file. Many a times we generate certain reports in an Excel Sheet but while sending that report to your boss, you want that to be saved in a PDF form. In such case you can simply save […]","og_url":"https:\/\/vmlogger.com\/excel\/2012\/11\/save-an-excel-sheet-as-pdf\/","og_site_name":"Let's excel in Excel","article_publisher":"http:\/\/www.facebook.com\/vmlogger","article_author":"http:\/\/www.facebook.com\/vmlogger","article_published_time":"2012-11-20T10:59:37+00:00","og_image":[{"url":"http:\/\/learnexcelmacro.com\/wp\/wp-content\/uploads\/sites\/11\/2012\/11\/Export-Page-Layout.png"}],"author":"Vishwamitra Mishra","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/www.twitter.com\/learnexcelmacro","twitter_site":"@learnexcelmacro","twitter_misc":{"Written by":"Vishwamitra Mishra","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/vmlogger.com\/excel\/2012\/11\/save-an-excel-sheet-as-pdf\/#article","isPartOf":{"@id":"https:\/\/vmlogger.com\/excel\/2012\/11\/save-an-excel-sheet-as-pdf\/"},"author":{"name":"Vishwamitra Mishra","@id":"https:\/\/vmlogger.com\/excel\/#\/schema\/person\/7500a107b0b2d35a8492acf0d11fc8e5"},"headline":"How to Export an Excel Sheet as PDF file","datePublished":"2012-11-20T10:59:37+00:00","dateModified":"2012-11-20T10:59:37+00:00","mainEntityOfPage":{"@id":"https:\/\/vmlogger.com\/excel\/2012\/11\/save-an-excel-sheet-as-pdf\/"},"wordCount":260,"commentCount":10,"publisher":{"@id":"https:\/\/vmlogger.com\/excel\/#\/schema\/person\/7500a107b0b2d35a8492acf0d11fc8e5"},"image":{"@id":"https:\/\/vmlogger.com\/excel\/2012\/11\/save-an-excel-sheet-as-pdf\/#primaryimage"},"thumbnailUrl":"https:\/\/vmlogger.com\/excel\/wp-content\/uploads\/sites\/11\/2012\/11\/Export-Page-Layout.png","articleSection":["Excel Macro","Excel Tips","Popular Articles"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/vmlogger.com\/excel\/2012\/11\/save-an-excel-sheet-as-pdf\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/vmlogger.com\/excel\/2012\/11\/save-an-excel-sheet-as-pdf\/","url":"https:\/\/vmlogger.com\/excel\/2012\/11\/save-an-excel-sheet-as-pdf\/","name":"How to Export an Excel Sheet as PDF file - Let's excel in Excel","isPartOf":{"@id":"https:\/\/vmlogger.com\/excel\/#website"},"primaryImageOfPage":{"@id":"https:\/\/vmlogger.com\/excel\/2012\/11\/save-an-excel-sheet-as-pdf\/#primaryimage"},"image":{"@id":"https:\/\/vmlogger.com\/excel\/2012\/11\/save-an-excel-sheet-as-pdf\/#primaryimage"},"thumbnailUrl":"https:\/\/vmlogger.com\/excel\/wp-content\/uploads\/sites\/11\/2012\/11\/Export-Page-Layout.png","datePublished":"2012-11-20T10:59:37+00:00","dateModified":"2012-11-20T10:59:37+00:00","breadcrumb":{"@id":"https:\/\/vmlogger.com\/excel\/2012\/11\/save-an-excel-sheet-as-pdf\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/vmlogger.com\/excel\/2012\/11\/save-an-excel-sheet-as-pdf\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/vmlogger.com\/excel\/2012\/11\/save-an-excel-sheet-as-pdf\/#primaryimage","url":"https:\/\/vmlogger.com\/excel\/wp-content\/uploads\/sites\/11\/2012\/11\/Export-Page-Layout.png","contentUrl":"https:\/\/vmlogger.com\/excel\/wp-content\/uploads\/sites\/11\/2012\/11\/Export-Page-Layout.png"},{"@type":"BreadcrumbList","@id":"https:\/\/vmlogger.com\/excel\/2012\/11\/save-an-excel-sheet-as-pdf\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/vmlogger.com\/excel\/"},{"@type":"ListItem","position":2,"name":"Excel Macro","item":"https:\/\/vmlogger.com\/excel\/macro\/"},{"@type":"ListItem","position":3,"name":"How to Export an Excel Sheet as PDF file"}]},{"@type":"WebSite","@id":"https:\/\/vmlogger.com\/excel\/#website","url":"https:\/\/vmlogger.com\/excel\/","name":"Let's excel in Excel","description":"Let's share knowledge","publisher":{"@id":"https:\/\/vmlogger.com\/excel\/#\/schema\/person\/7500a107b0b2d35a8492acf0d11fc8e5"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/vmlogger.com\/excel\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/vmlogger.com\/excel\/#\/schema\/person\/7500a107b0b2d35a8492acf0d11fc8e5","name":"Vishwamitra Mishra","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/vmlogger.com\/excel\/#\/schema\/person\/image\/","url":"https:\/\/vmlogger.com\/excel\/wp-content\/uploads\/sites\/11\/2022\/07\/avataaars-1.png","contentUrl":"https:\/\/vmlogger.com\/excel\/wp-content\/uploads\/sites\/11\/2022\/07\/avataaars-1.png","width":528,"height":560,"caption":"Vishwamitra Mishra"},"logo":{"@id":"https:\/\/vmlogger.com\/excel\/#\/schema\/person\/image\/"},"description":"My name is Vishwamitra Mishra. Friends Call me Vishwa. I hold a Bachelor\u2019s Degree in Computer Science from D.A.V.V. Indore & currently working as a Technical Lead having over 7 years of experience.","sameAs":["http:\/\/www.learnexcelmacro.com","http:\/\/www.facebook.com\/vmlogger","https:\/\/x.com\/https:\/\/www.twitter.com\/learnexcelmacro","https:\/\/www.youtube.com\/c\/VMLogger"],"url":"https:\/\/vmlogger.com\/excel\/author\/vishwamitra\/"}]}},"_links":{"self":[{"href":"https:\/\/vmlogger.com\/excel\/wp-json\/wp\/v2\/posts\/12167"}],"collection":[{"href":"https:\/\/vmlogger.com\/excel\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vmlogger.com\/excel\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vmlogger.com\/excel\/wp-json\/wp\/v2\/users\/45"}],"replies":[{"embeddable":true,"href":"https:\/\/vmlogger.com\/excel\/wp-json\/wp\/v2\/comments?post=12167"}],"version-history":[{"count":0,"href":"https:\/\/vmlogger.com\/excel\/wp-json\/wp\/v2\/posts\/12167\/revisions"}],"wp:attachment":[{"href":"https:\/\/vmlogger.com\/excel\/wp-json\/wp\/v2\/media?parent=12167"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vmlogger.com\/excel\/wp-json\/wp\/v2\/categories?post=12167"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vmlogger.com\/excel\/wp-json\/wp\/v2\/tags?post=12167"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}