{"id":598,"date":"2022-03-09T14:53:53","date_gmt":"2022-03-09T05:53:53","guid":{"rendered":"https:\/\/tippang.net\/?p=598"},"modified":"2022-03-09T15:00:04","modified_gmt":"2022-03-09T06:00:04","slug":"how-to-handle-an-excel-file-pythonexcel-method-3-w-xlsxwriter","status":"publish","type":"post","link":"https:\/\/tippang.net\/?p=598","title":{"rendered":"How to handle an excel file (Python+Excel method #3, w\/xlsxwriter)"},"content":{"rendered":"<p><em><strong>In a min, you can data manipulation as Excel &amp; Python Expert<\/strong><\/em><\/p>\n<p><img decoding=\"async\" class=\"alignnone wp-image-584\" src=\"https:\/\/tippang.net\/wp-content\/uploads\/2022\/03\/python-Excel2021-02-28-\u110b\u1169\u1112\u116e-9.14-1.png\" alt=\"\" width=\"310\" height=\"129\" srcset=\"https:\/\/tippang.net\/wp-content\/uploads\/2022\/03\/python-Excel2021-02-28-\u110b\u1169\u1112\u116e-9.14-1.png 521w, https:\/\/tippang.net\/wp-content\/uploads\/2022\/03\/python-Excel2021-02-28-\u110b\u1169\u1112\u116e-9.14-1-300x125.png 300w\" sizes=\"(max-width: 310px) 100vw, 310px\" \/><\/p>\n<p><!--more--><\/p>\n<p>Step 1<\/p>\n<ul>\n<li>Installation of free python tools for MacBook\/Windows using pycharm program with anaconda<br \/>\n\u2192 a <a href=\"https:\/\/medium.com\/@GalarnykMichael\/setting-up-pycharm-with-anaconda-plus-installing-packages-windows-mac-db2b158bd8c\" target=\"_blank\" rel=\"noopener\">link<\/a> for installation guide<\/li>\n<\/ul>\n<p>Step 2<\/p>\n<ul>\n<li>Installation python plug-ins for Excel<br \/>\n\u2192 a <a href=\"https:\/\/xlsxwriter.readthedocs.io\/\" target=\"_blank\" rel=\"noopener\">link<\/a> for installation guide<\/li>\n<li>Step by Step\n<ul>\n<li>Move to terminal in PyCharm<\/li>\n<li>Install plug-in using a comment : pip install package-name (xlsxwriter-xxxx, pandas)\n<ul>\n<li>Example : pip install xlsxwriter<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>Step 3<\/p>\n<ul>\n<li>Writing a source Code (Sample) \u2192 a video link for installtion guide (tbd)<\/li>\n<li>Creation three excel files to merge as one file, then run python code to merge those<\/li>\n<\/ul>\n<p><strong><em>\u2192 a sample code<\/em><\/strong><\/p>\n<pre>import xlsxwriter\r\n\r\ninput_folder = '\/Users\/tippang\/PycharmProjects\/pythonProject2\/tmp'\r\nexcel_file = input_folder + 'tst5.xlsx'\r\n\r\nwb = xlsxwriter.Workbook(excel_file)\r\n\r\nws = wb.add_worksheet()\r\n\r\nws.set_row(0,10)\r\nws.set_row(1,30)\r\nws.set_row(2,50)\r\n\r\nws.set_column(0, 0, 10)\r\nws.set_column(1, 3, 30)\r\nws.set_column(3, 4, 50)\r\n\r\nws.write('A1',\"height : 10, width : 10\")\r\nws.write('A2',\"height : 30, width : 30\")\r\nws.write('A3',\"height : 50, width : 50\")\r\n\r\nwb.close()\r\n\r\nprint(\"created file\", excel_file)<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>In a min, you can data manipulation as Excel &amp; Python Expert<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"om_disable_all_campaigns":false,"footnotes":""},"categories":[17,6,18],"tags":[],"class_list":["post-598","post","type-post","status-publish","format-standard","hentry","category-excel","category-officetool","category-python"],"aioseo_notices":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.7 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to handle an excel file (Python+Excel method #3, w\/xlsxwriter) - tippang.net<\/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:\/\/tippang.net\/?p=598\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"og:locale\" content=\"en_US\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"og:type\" content=\"article\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"og:title\" content=\"How to handle an excel file (Python+Excel method #3, w\/xlsxwriter) - tippang.net\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"og:description\" content=\"In a min, you can data manipulation as Excel &amp; Python Expert\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"og:url\" content=\"https:\/\/tippang.net\/?p=598\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"og:site_name\" content=\"tippang.net\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"article:published_time\" content=\"2022-03-09T05:53:53+00:00\" class=\"yoast-seo-meta-tag\" \/>\n<meta property=\"article:modified_time\" content=\"2022-03-09T06:00:04+00:00\" class=\"yoast-seo-meta-tag\" \/>\n<meta name=\"author\" content=\"Charles\" class=\"yoast-seo-meta-tag\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" class=\"yoast-seo-meta-tag\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" class=\"yoast-seo-meta-tag\" \/>\n\t<meta name=\"twitter:data1\" content=\"Charles\" class=\"yoast-seo-meta-tag\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" class=\"yoast-seo-meta-tag\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" class=\"yoast-seo-meta-tag\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/tippang.net\/?p=598#article\",\"isPartOf\":{\"@id\":\"https:\/\/tippang.net\/?p=598\"},\"author\":{\"name\":\"Charles\",\"@id\":\"https:\/\/tippang.net\/#\/schema\/person\/d1b0d568e5385a89b638f3eedf2dca86\"},\"headline\":\"How to handle an excel file (Python+Excel method #3, w\/xlsxwriter)\",\"datePublished\":\"2022-03-09T05:53:53+00:00\",\"dateModified\":\"2022-03-09T06:00:04+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/tippang.net\/?p=598\"},\"wordCount\":107,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/tippang.net\/#organization\"},\"articleSection\":[\"Excel\",\"OFFICETOOL\",\"Python\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/tippang.net\/?p=598#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/tippang.net\/?p=598\",\"url\":\"https:\/\/tippang.net\/?p=598\",\"name\":\"How to handle an excel file (Python+Excel method #3, w\/xlsxwriter) - tippang.net\",\"isPartOf\":{\"@id\":\"https:\/\/tippang.net\/#website\"},\"datePublished\":\"2022-03-09T05:53:53+00:00\",\"dateModified\":\"2022-03-09T06:00:04+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/tippang.net\/?p=598#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/tippang.net\/?p=598\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/tippang.net\/?p=598#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/tippang.net\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"How to handle an excel file (Python+Excel method #3, w\/xlsxwriter)\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/tippang.net\/#website\",\"url\":\"https:\/\/tippang.net\/\",\"name\":\"tippang.net\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/tippang.net\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/tippang.net\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/tippang.net\/#organization\",\"name\":\"tippang.net\",\"url\":\"https:\/\/tippang.net\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/tippang.net\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/tippang.net\/wp-content\/uploads\/2021\/02\/cropped-\u110e\u1162\u1102\u1165\u11af\u110b\u1161\u110b\u1175\u110f\u1169\u11ab1_\u1100\u1165\u1107\u116e\u11a8\u110b\u1175.png\",\"contentUrl\":\"https:\/\/tippang.net\/wp-content\/uploads\/2021\/02\/cropped-\u110e\u1162\u1102\u1165\u11af\u110b\u1161\u110b\u1175\u110f\u1169\u11ab1_\u1100\u1165\u1107\u116e\u11a8\u110b\u1175.png\",\"width\":280,\"height\":280,\"caption\":\"tippang.net\"},\"image\":{\"@id\":\"https:\/\/tippang.net\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/tippang.net\/#\/schema\/person\/d1b0d568e5385a89b638f3eedf2dca86\",\"name\":\"Charles\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/tippang.net\/#\/schema\/person\/image\/\",\"url\":\"\/\/www.gravatar.com\/avatar\/3a452b00f5e85211cbb28d2708d7f18f?s=96&#038;r=g&#038;d=wavatar\",\"contentUrl\":\"\/\/www.gravatar.com\/avatar\/3a452b00f5e85211cbb28d2708d7f18f?s=96&#038;r=g&#038;d=wavatar\",\"caption\":\"Charles\"},\"description\":\"An IT Guy On earth\",\"sameAs\":[\"https:\/\/www.tiptip.today\"],\"url\":\"https:\/\/tippang.net\/author\/cm201705\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to handle an excel file (Python+Excel method #3, w\/xlsxwriter) - tippang.net","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:\/\/tippang.net\/?p=598","og_locale":"en_US","og_type":"article","og_title":"How to handle an excel file (Python+Excel method #3, w\/xlsxwriter) - tippang.net","og_description":"In a min, you can data manipulation as Excel &amp; Python Expert","og_url":"https:\/\/tippang.net\/?p=598","og_site_name":"tippang.net","article_published_time":"2022-03-09T05:53:53+00:00","article_modified_time":"2022-03-09T06:00:04+00:00","author":"Charles","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Charles","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/tippang.net\/?p=598#article","isPartOf":{"@id":"https:\/\/tippang.net\/?p=598"},"author":{"name":"Charles","@id":"https:\/\/tippang.net\/#\/schema\/person\/d1b0d568e5385a89b638f3eedf2dca86"},"headline":"How to handle an excel file (Python+Excel method #3, w\/xlsxwriter)","datePublished":"2022-03-09T05:53:53+00:00","dateModified":"2022-03-09T06:00:04+00:00","mainEntityOfPage":{"@id":"https:\/\/tippang.net\/?p=598"},"wordCount":107,"commentCount":0,"publisher":{"@id":"https:\/\/tippang.net\/#organization"},"articleSection":["Excel","OFFICETOOL","Python"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/tippang.net\/?p=598#respond"]}]},{"@type":"WebPage","@id":"https:\/\/tippang.net\/?p=598","url":"https:\/\/tippang.net\/?p=598","name":"How to handle an excel file (Python+Excel method #3, w\/xlsxwriter) - tippang.net","isPartOf":{"@id":"https:\/\/tippang.net\/#website"},"datePublished":"2022-03-09T05:53:53+00:00","dateModified":"2022-03-09T06:00:04+00:00","breadcrumb":{"@id":"https:\/\/tippang.net\/?p=598#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/tippang.net\/?p=598"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/tippang.net\/?p=598#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/tippang.net\/"},{"@type":"ListItem","position":2,"name":"How to handle an excel file (Python+Excel method #3, w\/xlsxwriter)"}]},{"@type":"WebSite","@id":"https:\/\/tippang.net\/#website","url":"https:\/\/tippang.net\/","name":"tippang.net","description":"","publisher":{"@id":"https:\/\/tippang.net\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/tippang.net\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/tippang.net\/#organization","name":"tippang.net","url":"https:\/\/tippang.net\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/tippang.net\/#\/schema\/logo\/image\/","url":"https:\/\/tippang.net\/wp-content\/uploads\/2021\/02\/cropped-\u110e\u1162\u1102\u1165\u11af\u110b\u1161\u110b\u1175\u110f\u1169\u11ab1_\u1100\u1165\u1107\u116e\u11a8\u110b\u1175.png","contentUrl":"https:\/\/tippang.net\/wp-content\/uploads\/2021\/02\/cropped-\u110e\u1162\u1102\u1165\u11af\u110b\u1161\u110b\u1175\u110f\u1169\u11ab1_\u1100\u1165\u1107\u116e\u11a8\u110b\u1175.png","width":280,"height":280,"caption":"tippang.net"},"image":{"@id":"https:\/\/tippang.net\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/tippang.net\/#\/schema\/person\/d1b0d568e5385a89b638f3eedf2dca86","name":"Charles","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/tippang.net\/#\/schema\/person\/image\/","url":"\/\/www.gravatar.com\/avatar\/3a452b00f5e85211cbb28d2708d7f18f?s=96&#038;r=g&#038;d=wavatar","contentUrl":"\/\/www.gravatar.com\/avatar\/3a452b00f5e85211cbb28d2708d7f18f?s=96&#038;r=g&#038;d=wavatar","caption":"Charles"},"description":"An IT Guy On earth","sameAs":["https:\/\/www.tiptip.today"],"url":"https:\/\/tippang.net\/author\/cm201705"}]}},"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/tippang.net\/index.php?rest_route=\/wp\/v2\/posts\/598","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tippang.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tippang.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tippang.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tippang.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=598"}],"version-history":[{"count":2,"href":"https:\/\/tippang.net\/index.php?rest_route=\/wp\/v2\/posts\/598\/revisions"}],"predecessor-version":[{"id":600,"href":"https:\/\/tippang.net\/index.php?rest_route=\/wp\/v2\/posts\/598\/revisions\/600"}],"wp:attachment":[{"href":"https:\/\/tippang.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=598"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tippang.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=598"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tippang.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=598"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}