{"id":644,"date":"2014-06-18T19:01:47","date_gmt":"2014-06-19T00:01:47","guid":{"rendered":"http:\/\/homepages.uc.edu\/~yaozo\/wordpress\/?p=644"},"modified":"2014-06-18T19:01:47","modified_gmt":"2014-06-19T00:01:47","slug":"xlconnect-read-write-and-manipulate-microsoft-excel-files-from-within-r-2","status":"publish","type":"post","link":"https:\/\/zhuoyao.net\/index.php\/2014\/06\/18\/xlconnect-read-write-and-manipulate-microsoft-excel-files-from-within-r-2\/","title":{"rendered":"XLConnect : read, write and manipulate Microsoft Excel files from within R"},"content":{"rendered":"<p><span style=\"color: blue;\">XLConnect is a package that allows for reading, writing and manipulating Microsoft Excel files from within<br \/>\nR.\u00a0<\/span><br style=\"color: #3f5164;\" \/><br style=\"color: #3f5164;\" \/><span style=\"color: #3f5164;\">It does not require any installation of Microsoft Excel or any other special drivers to be able to read &amp; write Excel files. The only requirement is a recent version of a Java Runtime Environment (JRE).<\/span><br style=\"color: #3f5164;\" \/><br style=\"color: #3f5164;\" \/><span style=\"color: #3f5164;\">In order to get started have a look at the\u00a0<\/span><a style=\"font-weight: bold; color: #2f5b8a;\" href=\"http:\/\/cran.r-project.org\/web\/packages\/XLConnect\/vignettes\/XLConnect.pdf\">package vignette<\/a><span style=\"color: #3f5164;\">, the numerous demos available via demo(package = &#8220;XLConnect&#8221;) or browse through the comprehensive<\/span><a style=\"font-weight: bold; color: #2f5b8a;\" href=\"http:\/\/cran.r-project.org\/web\/packages\/XLConnect\/XLConnect.pdf\">\u00a0reference manual<\/a><span style=\"color: #3f5164;\">.<\/span><br style=\"color: #3f5164;\" \/><br style=\"color: #3f5164;\" \/><\/p>\n<h3 class=\"title2\" style=\"font-weight: bold; color: #3e4d5c;\">Installation<\/h3>\n<p><br style=\"color: #3f5164;\" \/><br style=\"color: #3f5164;\" \/><br style=\"color: #3f5164;\" \/><\/p>\n<h4 class=\"stitle1\" style=\"font-weight: bold; color: #3e4d5c;\">Software Requirements<\/h4>\n<p><br style=\"color: #3f5164;\" \/><br style=\"color: #3f5164;\" \/><\/p>\n<ul class=\"bb_ul\" style=\"color: #3f5164;\">\n<li class=\"bb_li\">R, version 2.10.0 or higher<\/li>\n<li class=\"bb_li\">Java Runtime Environment (JRE), version 6.0 or higher<\/li>\n<\/ul>\n<p><br style=\"color: #3f5164;\" \/><br style=\"color: #3f5164;\" \/><span class=\"notice\" style=\"color: #334455;\"><br \/>\nif you don&#8217;t have JRE on your computer, you have to install it :<br \/>\non linux \/ubuntu use this command : apt-get install openjdk-6-jdk<br \/>\n<\/span><br style=\"color: #3f5164;\" \/><br style=\"color: #3f5164;\" \/><br style=\"color: #3f5164;\" \/><\/p>\n<h4 class=\"stitle1\" style=\"font-weight: bold; color: #3e4d5c;\">Package Installation<\/h4>\n<p><br style=\"color: #3f5164;\" \/><br style=\"color: #3f5164;\" \/><br style=\"color: #3f5164;\" \/><span style=\"color: #3f5164;\">XLConnect can be easily installed by using the install.packages() command in your R session:<\/span><br style=\"color: #3f5164;\" \/><br style=\"color: #3f5164;\" \/><span class=\"text_code\" style=\"font-weight: bold; color: #3f5164;\">Code R :<\/span><\/p>\n<div class=\"code\" style=\"color: #000000;\">\n<pre class=\"r\"><a style=\"font-weight: bold; color: #2f5b8a;\" href=\"http:\/\/www.inside-r.org\/r-doc\/utils\/install%252Epackages\"><span style=\"color: #0000ff;\">install.packages<\/span><\/a><span style=\"color: #008800;\">(<\/span><span style=\"color: #ff0000;\">\"XLConnect\"<\/span><span style=\"color: #008800;\">)<\/span><\/pre>\n<\/div>\n<p><br style=\"color: #3f5164;\" \/><br style=\"color: #3f5164;\" \/><\/p>\n<h3 class=\"title2\" style=\"font-weight: bold; color: #3e4d5c;\">Writing Excel files<\/h3>\n<p><br style=\"color: #3f5164;\" \/><br style=\"color: #3f5164;\" \/><br style=\"color: #3f5164;\" \/><\/p>\n<h4 class=\"stitle1\" style=\"font-weight: bold; color: #3e4d5c;\">Basic functions<\/h4>\n<p><br style=\"color: #3f5164;\" \/><br style=\"color: #3f5164;\" \/><span class=\"text_code\" style=\"font-weight: bold; color: #3f5164;\">Code R :<\/span><\/p>\n<div class=\"code\" style=\"color: #000000;\">\n<pre class=\"r\">\u00a0\n<span style=\"color: #228b22;\">#loading the package<\/span>\n<a style=\"font-weight: bold; color: #2f5b8a;\" href=\"http:\/\/www.inside-r.org\/r-doc\/base\/require\"><span style=\"color: #0000ff;\">require<\/span><\/a><span style=\"color: #008800;\">(<\/span>XLConnect<span style=\"color: #008800;\">)<\/span>\n\u00a0\n<span style=\"color: #228b22;\">#creating an Excel workbook. Both .xls and .xlsx file formats can be used.<\/span>\nwb <span style=\"color: #008800;\">&lt;-<\/span> loadWorkbook<span style=\"color: #008800;\">(<\/span><span style=\"color: #ff0000;\">\"XLConnectExample1.xlsx\"<\/span>, create <span style=\"color: #008800;\">=<\/span> TRUE<span style=\"color: #008800;\">)<\/span>\n\u00a0\n<span style=\"color: #228b22;\">#creating sheets within an Excel workbook<\/span>\ncreateSheet<span style=\"color: #008800;\">(<\/span>wb, name <span style=\"color: #008800;\">=<\/span> <span style=\"color: #ff0000;\">\"chickSheet\"<\/span><span style=\"color: #008800;\">)<\/span>\n\u00a0\n<span style=\"color: #228b22;\">#writing into sheets within an Excel workbook : <\/span>\n<span style=\"color: #228b22;\">#writing ChickWeight data frame into chickSheet<\/span>\nwriteWorksheet<span style=\"color: #008800;\">(<\/span>wb, <a style=\"font-weight: bold; color: #2f5b8a;\" href=\"http:\/\/www.inside-r.org\/r-doc\/datasets\/ChickWeight\"><span style=\"color: #cc9900;\">ChickWeight<\/span><\/a>, sheet <span style=\"color: #008800;\">=<\/span> <span style=\"color: #ff0000;\">\"chickSheet\"<\/span>, startRow <span style=\"color: #008800;\">=<\/span> <span style=\"color: #ff0000;\">3<\/span>, startCol <span style=\"color: #008800;\">=<\/span> <span style=\"color: #ff0000;\">4<\/span><span style=\"color: #008800;\">)<\/span>\n\u00a0\n<span style=\"color: #228b22;\">#saving a workbook to an Excel file :<\/span>\n<span style=\"color: #228b22;\">#saves a workbook to the corresponding Excel file and writes the file to disk.<\/span>\nsaveWorkbook<span style=\"color: #008800;\">(<\/span>wb<span style=\"color: #008800;\">)<\/span>\n<\/pre>\n<\/div>\n<p><br style=\"color: #3f5164;\" \/><br style=\"color: #3f5164;\" \/><br style=\"color: #3f5164;\" \/><\/p>\n<p style=\"color: #3f5164;\"><img decoding=\"async\" class=\"valign_\" src=\"http:\/\/www.sthda.com\/upload\/write_execel_with_r_1.png\" alt=\"\" \/><\/p>\n<p><br style=\"color: #3f5164;\" \/><br style=\"color: #3f5164;\" \/><br style=\"color: #3f5164;\" \/><br style=\"color: #3f5164;\" \/><\/p>\n<h4 class=\"stitle1\" style=\"font-weight: bold; color: #3e4d5c;\">Writing sheet with one call<\/h4>\n<p><br style=\"color: #3f5164;\" \/><br style=\"color: #3f5164;\" \/><br style=\"color: #3f5164;\" \/><span style=\"color: #3f5164;\">The four lines of code presented in the previous example can be replaced with a single call of the<\/span><br style=\"color: #3f5164;\" \/><strong style=\"color: #3f5164;\"><span style=\"color: blue;\">writeWorksheetToFile()<\/span><\/strong><span style=\"color: #3f5164;\">\u00a0function:<\/span><br style=\"color: #3f5164;\" \/><br style=\"color: #3f5164;\" \/><span class=\"text_code\" style=\"font-weight: bold; color: #3f5164;\">Code R :<\/span><\/p>\n<div class=\"code\" style=\"color: #000000;\">\n<pre class=\"r\">\u00a0\n<a style=\"font-weight: bold; color: #2f5b8a;\" href=\"http:\/\/www.inside-r.org\/r-doc\/base\/require\"><span style=\"color: #0000ff;\">require<\/span><\/a><span style=\"color: #008800;\">(<\/span>XLConnect<span style=\"color: #008800;\">)<\/span>\nwriteWorksheetToFile<span style=\"color: #008800;\">(<\/span><span style=\"color: #ff0000;\">\"XLConnectExample2.xlsx\"<\/span>, <a style=\"font-weight: bold; color: #2f5b8a;\" href=\"http:\/\/www.inside-r.org\/r-doc\/utils\/data\"><span style=\"color: #0000ff;\">data<\/span><\/a> <span style=\"color: #008800;\">=<\/span> <a style=\"font-weight: bold; color: #2f5b8a;\" href=\"http:\/\/www.inside-r.org\/r-doc\/datasets\/ChickWeight\"><span style=\"color: #cc9900;\">ChickWeight<\/span><\/a>, \n                                 sheet <span style=\"color: #008800;\">=<\/span> <span style=\"color: #ff0000;\">\"chickSheet\"<\/span>, startRow <span style=\"color: #008800;\">=<\/span> <span style=\"color: #ff0000;\">3<\/span>, startCol <span style=\"color: #008800;\">=<\/span> <span style=\"color: #ff0000;\">4<\/span><span style=\"color: #008800;\">)<\/span>\n<\/pre>\n<\/div>\n<p><br style=\"color: #3f5164;\" \/><br style=\"color: #3f5164;\" \/><span class=\"notice\" style=\"color: #334455;\"><strong><span style=\"color: blue;\">writeWorksheetToFile()<\/span><\/strong>\u00a0loads the workbook, creates the sheet and finally saves the workbook. When you only need to write one sheet into an Excel file, this is probably the better choice. If you need to write more sheets, however, using the functions presented in the previous example will be more efficient. This is because calling\u00a0<span style=\"color: blue;\">writeWorksheetToFile()<\/span>\u00a0multiple times will open, write and close the Excel file with each call. Using the functions in the first example will, in contrast, allow you to open the workbook, do multiple operations on it and only then close it.<\/span><br style=\"color: #3f5164;\" \/><br style=\"color: #3f5164;\" \/><br style=\"color: #3f5164;\" \/><\/p>\n<h3 class=\"title2\" style=\"font-weight: bold; color: #3e4d5c;\">Reading from an Excel sheet<\/h3>\n<p><br style=\"color: #3f5164;\" \/><br style=\"color: #3f5164;\" \/><span style=\"color: #3f5164;\">For this purpose, we will use the file created in the above example. We set the endRow argument to 10, to limit the result. We set the rest of arguments specifying boundaries as 0, so that they are automatically determined.<\/span><br style=\"color: #3f5164;\" \/><span style=\"color: #3f5164;\">Please note, that alternatively to setting the sheet argument to the name of the sheet we want to read from, &#8220;chickSheet&#8221;, we could also specify it with the sheet index, as sheet = 1.<\/span><br style=\"color: #3f5164;\" \/><br style=\"color: #3f5164;\" \/><br style=\"color: #3f5164;\" \/><br style=\"color: #3f5164;\" \/><\/p>\n<h4 class=\"stitle1\" style=\"font-weight: bold; color: #3e4d5c;\">Basic functions<\/h4>\n<p><br style=\"color: #3f5164;\" \/><br style=\"color: #3f5164;\" \/><br style=\"color: #3f5164;\" \/><br style=\"color: #3f5164;\" \/><span class=\"text_code\" style=\"font-weight: bold; color: #3f5164;\">Code R :<\/span><\/p>\n<div class=\"code\" style=\"color: #000000;\">\n<pre class=\"r\">\u00a0\n<span style=\"color: #228b22;\">#loading the package<\/span>\n<a style=\"font-weight: bold; color: #2f5b8a;\" href=\"http:\/\/www.inside-r.org\/r-doc\/base\/require\"><span style=\"color: #0000ff;\">require<\/span><\/a><span style=\"color: #008800;\">(<\/span>XLConnect<span style=\"color: #008800;\">)<\/span>\n\u00a0\n<span style=\"color: #228b22;\">#Loading an Excel workbook. Both .xls and .xlsx file formats can be used.<\/span>\nwb <span style=\"color: #008800;\">=<\/span> loadWorkbook<span style=\"color: #008800;\">(<\/span><span style=\"color: #ff0000;\">\"XLConnectExample1.xlsx\"<\/span>, create <span style=\"color: #008800;\">=<\/span> TRUE<span style=\"color: #008800;\">)<\/span>\n\u00a0\n<span style=\"color: #228b22;\">#reading worksheets of an Excel workbook<\/span>\n<a style=\"font-weight: bold; color: #2f5b8a;\" href=\"http:\/\/www.inside-r.org\/r-doc\/utils\/data\"><span style=\"color: #0000ff;\">data<\/span><\/a> <span style=\"color: #008800;\">=<\/span> readWorksheet<span style=\"color: #008800;\">(<\/span>wb, sheet <span style=\"color: #008800;\">=<\/span> <span style=\"color: #ff0000;\">\"chickSheet\"<\/span>, startRow <span style=\"color: #008800;\">=<\/span> <span style=\"color: #ff0000;\">0<\/span>, endRow <span style=\"color: #008800;\">=<\/span> <span style=\"color: #ff0000;\">10<\/span>,\nstartCol <span style=\"color: #008800;\">=<\/span> <span style=\"color: #ff0000;\">0<\/span>, endCol <span style=\"color: #008800;\">=<\/span> <span style=\"color: #ff0000;\">0<\/span><span style=\"color: #008800;\">)<\/span>\n\u00a0\n<span style=\"color: #228b22;\">#print data<\/span>\n<a style=\"font-weight: bold; color: #2f5b8a;\" href=\"http:\/\/www.inside-r.org\/r-doc\/utils\/data\"><span style=\"color: #0000ff;\">data<\/span><\/a>\n<\/pre>\n<\/div>\n<p><br style=\"color: #3f5164;\" \/><br style=\"color: #3f5164;\" \/><\/p>\n<pre style=\"color: #3f5164;\">  weight Time Chick Diet\n1     42    0     1    1\n2     51    2     1    1\n3     59    4     1    1\n4     64    6     1    1\n5     76    8     1    1\n6     93   10     1    1\n7    106   12     1    1\n<\/pre>\n<p><br style=\"color: #3f5164;\" \/><br style=\"color: #3f5164;\" \/><br style=\"color: #3f5164;\" \/><br style=\"color: #3f5164;\" \/><\/p>\n<h4 class=\"stitle1\" style=\"font-weight: bold; color: #3e4d5c;\">Reading from an Excel sheet with one call<\/h4>\n<p><br style=\"color: #3f5164;\" \/><br style=\"color: #3f5164;\" \/><br style=\"color: #3f5164;\" \/><span class=\"text_code\" style=\"font-weight: bold; color: #3f5164;\">Code R :<\/span><\/p>\n<div class=\"code\" style=\"color: #000000;\">\n<pre class=\"r\">\u00a0\n<a style=\"font-weight: bold; color: #2f5b8a;\" href=\"http:\/\/www.inside-r.org\/r-doc\/base\/require\"><span style=\"color: #0000ff;\">require<\/span><\/a><span style=\"color: #008800;\">(<\/span>XLConnect<span style=\"color: #008800;\">)<\/span>\n<a style=\"font-weight: bold; color: #2f5b8a;\" href=\"http:\/\/www.inside-r.org\/r-doc\/utils\/data\"><span style=\"color: #0000ff;\">data<\/span><\/a> <span style=\"color: #008800;\">=<\/span> readWorksheetFromFile<span style=\"color: #008800;\">(<\/span><span style=\"color: #ff0000;\">\"XLConnectExample1.xlsx\"<\/span>, sheet <span style=\"color: #008800;\">=<\/span> <span style=\"color: #ff0000;\">\"chickSheet\"<\/span>, \nstartRow <span style=\"color: #008800;\">=<\/span> <span style=\"color: #ff0000;\">0<\/span>, endRow <span style=\"color: #008800;\">=<\/span> <span style=\"color: #ff0000;\">10<\/span>, startCol <span style=\"color: #008800;\">=<\/span> <span style=\"color: #ff0000;\">0<\/span>, endCol <span style=\"color: #008800;\">=<\/span> <span style=\"color: #ff0000;\">0<\/span><span style=\"color: #008800;\">)<\/span>\n<\/pre>\n<\/div>\n<p><br style=\"color: #3f5164;\" \/><br style=\"color: #3f5164;\" \/><\/p>\n<h3 class=\"title2\" style=\"font-weight: bold; color: #3e4d5c;\">Adds an image to a worksheet using a named region<\/h3>\n<p><br style=\"color: #3f5164;\" \/><span class=\"text_code\" style=\"font-weight: bold; color: #3f5164;\">Code R :<\/span><\/p>\n<div class=\"code\" style=\"color: #000000;\">\n<pre class=\"r\">\u00a0\n<span style=\"color: #228b22;\"># Load workbook (create if not existing)<\/span>\nwb <span style=\"color: #008800;\">=<\/span> loadWorkbook<span style=\"color: #008800;\">(<\/span><span style=\"color: #ff0000;\">\"add_image_to_excel.xls\"<\/span>, create<span style=\"color: #008800;\">=<\/span>TRUE<span style=\"color: #008800;\">)<\/span>\n\u00a0\n<span style=\"color: #228b22;\"># Create a sheet named 'boxplot'<\/span>\ncreateSheet<span style=\"color: #008800;\">(<\/span>wb, name <span style=\"color: #008800;\">=<\/span> <span style=\"color: #ff0000;\">\"boxplot\"<\/span><span style=\"color: #008800;\">)<\/span>\n\u00a0\n<span style=\"color: #228b22;\"># Create a named region called 'boxplot' referring to the sheet<\/span>\n<span style=\"color: #228b22;\"># called 'boxplot' <\/span>\ncreateName<span style=\"color: #008800;\">(<\/span>wb, name <span style=\"color: #008800;\">=<\/span> <span style=\"color: #ff0000;\">\"boxplot\"<\/span>, <a style=\"font-weight: bold; color: #2f5b8a;\" href=\"http:\/\/www.inside-r.org\/r-doc\/stats\/formula\"><span style=\"color: #0000ff;\">formula<\/span><\/a> <span style=\"color: #008800;\">=<\/span> <span style=\"color: #ff0000;\">\"boxplot!$B$2\"<\/span><span style=\"color: #008800;\">)<\/span>\n\u00a0\n<span style=\"color: #228b22;\"># Create R plot to a png device<\/span>\n<a style=\"font-weight: bold; color: #2f5b8a;\" href=\"http:\/\/www.inside-r.org\/r-doc\/grDevices\/png\"><span style=\"color: #0000ff;\">png<\/span><\/a><span style=\"color: #008800;\">(<\/span>filename <span style=\"color: #008800;\">=<\/span> <span style=\"color: #ff0000;\">\"boxplot.png\"<\/span>, width <span style=\"color: #008800;\">=<\/span> <span style=\"color: #ff0000;\">800<\/span>, height <span style=\"color: #008800;\">=<\/span> <span style=\"color: #ff0000;\">600<\/span><span style=\"color: #008800;\">)<\/span>\n<a style=\"font-weight: bold; color: #2f5b8a;\" href=\"http:\/\/www.inside-r.org\/r-doc\/graphics\/boxplot\"><span style=\"color: #0000ff;\">boxplot<\/span><\/a><span style=\"color: #008800;\">(<\/span>count ~ spray, <a style=\"font-weight: bold; color: #2f5b8a;\" href=\"http:\/\/www.inside-r.org\/r-doc\/utils\/data\"><span style=\"color: #0000ff;\">data<\/span><\/a> <span style=\"color: #008800;\">=<\/span> <a style=\"font-weight: bold; color: #2f5b8a;\" href=\"http:\/\/www.inside-r.org\/r-doc\/datasets\/InsectSprays\"><span style=\"color: #cc9900;\">InsectSprays<\/span><\/a>, <a style=\"font-weight: bold; color: #2f5b8a;\" href=\"http:\/\/www.inside-r.org\/r-doc\/base\/col\"><span style=\"color: #0000ff;\">col<\/span><\/a> <span style=\"color: #008800;\">=<\/span> <span style=\"color: #ff0000;\">\"lightgray\"<\/span><span style=\"color: #008800;\">)<\/span>\n<a style=\"font-weight: bold; color: #2f5b8a;\" href=\"http:\/\/www.inside-r.org\/r-doc\/grDevices\/dev%252Eoff\"><span style=\"color: #0000ff;\">dev.off<\/span><\/a><span style=\"color: #008800;\">(<\/span><span style=\"color: #008800;\">)<\/span>\n\u00a0\n<span style=\"color: #228b22;\"># Write image to the named region created above<\/span>\naddImage<span style=\"color: #008800;\">(<\/span>wb, filename <span style=\"color: #008800;\">=<\/span> <span style=\"color: #ff0000;\">\"boxplot.png\"<\/span>, name<span style=\"color: #008800;\">=<\/span><span style=\"color: #ff0000;\">\"boxplot\"<\/span>, originalSize <span style=\"color: #008800;\">=<\/span> TRUE<span style=\"color: #008800;\">)<\/span>\n\u00a0\n<span style=\"color: #228b22;\"># Save workbook (this actually writes the file to disk)<\/span>\nsaveWorkbook<span style=\"color: #008800;\">(<\/span>wb<span style=\"color: #008800;\">)<\/span>\n<\/pre>\n<\/div>\n<p><br style=\"color: #3f5164;\" \/><br style=\"color: #3f5164;\" \/><br style=\"color: #3f5164;\" \/><span style=\"color: #3f5164;\">As a result, we obtain the following graph, written into Excel file<\/span><br style=\"color: #3f5164;\" \/><img decoding=\"async\" class=\"valign_\" style=\"color: #3f5164;\" src=\"http:\/\/www.sthda.com\/upload\/add_graph_to_excel.png\" alt=\"\" \/><\/p>\n<div class=\"spacer\" style=\"color: #3f5164;\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>XLConnect is a package that allows for reading, writing and manipulating Microsoft Excel files from within R.\u00a0It does not require any installation of Microsoft Excel&hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[],"class_list":["post-644","post","type-post","status-publish","format-standard","hentry","category-r"],"_links":{"self":[{"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/posts\/644","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/comments?post=644"}],"version-history":[{"count":0,"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/posts\/644\/revisions"}],"wp:attachment":[{"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/media?parent=644"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/categories?post=644"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/zhuoyao.net\/index.php\/wp-json\/wp\/v2\/tags?post=644"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}