{"id":29044,"date":"2025-09-18T22:50:51","date_gmt":"2025-09-18T17:05:51","guid":{"rendered":"https:\/\/lmc.gov.np\/?page_id=29044"},"modified":"2025-11-26T22:54:44","modified_gmt":"2025-11-26T17:09:44","slug":"employee-details","status":"publish","type":"page","link":"https:\/\/lmc.gov.np\/en\/employee-details\/","title":{"rendered":"Employee Details"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"29044\" class=\"elementor elementor-29044\" data-elementor-settings=\"{&quot;ha_cmc_init_switcher&quot;:&quot;no&quot;}\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-19499102 e-flex e-con-boxed e-con e-parent\" data-id=\"19499102\" data-element_type=\"container\" data-e-type=\"container\" data-settings=\"{&quot;_ha_eqh_enable&quot;:false}\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-ff31cf9 elementor-widget elementor-widget-text-editor\" data-id=\"ff31cf9\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\n<div id=\"sheet-data\"><\/div>\n<script>\nasync function loadSheetData() {\n  const sheetId = \"1Wvu7jPoBS01SenEY3SsooqKihvOC91rytwedBrCJ8Is\";\n  const apiKey = \"AIzaSyDvE1EzwJ1CEQlFwxX2y8mPQ2MWCTxitm8\";\n  const range = \"Sheet1!A1:F592\"; \/\/ adjust as needed\n\n  const url = `https:\/\/sheets.googleapis.com\/v4\/spreadsheets\/${sheetId}?includeGridData=true&ranges=${range}&key=${apiKey}`;\n  const response = await fetch(url);\n  const data = await response.json();\n\n  if (!data.sheets) {\n    document.getElementById(\"sheet-data\").innerHTML = \"No data found or access denied.\";\n    return;\n  }\n\n  const rows = data.sheets[0].data[0].rowData || [];\n  let html = \"<table border='1' style='border-collapse:collapse; width:100%;'>\";\n\n  rows.forEach((row, i) => {\n    html += \"<tr>\";\n    if (!row.values) return;\n\n    row.values.forEach(cell => {\n      let text = cell.formattedValue || \"\";\n      let style = \"\";\n\n      \/\/ Background color\n      if (cell.effectiveFormat && cell.effectiveFormat.backgroundColor) {\n        const c = cell.effectiveFormat.backgroundColor;\n        const r = Math.round((c.red || 0) * 255);\n        const g = Math.round((c.green || 0) * 255);\n        const b = Math.round((c.blue || 0) * 255);\n        style += `background:rgb(${r},${g},${b});`;\n      }\n\n      \/\/ Bold text\n      if (cell.effectiveFormat?.textFormat?.bold) {\n        style += \"font-weight:bold;\";\n      }\n\n      \/\/ Italic text\n      if (cell.effectiveFormat?.textFormat?.italic) {\n        style += \"font-style:italic;\";\n      }\n\n      \/\/ Text color\n      if (cell.effectiveFormat?.textFormat?.foregroundColor) {\n        const c = cell.effectiveFormat.textFormat.foregroundColor;\n        const r = Math.round((c.red || 0) * 255);\n        const g = Math.round((c.green || 0) * 255);\n        const b = Math.round((c.blue || 0) * 255);\n        style += `color:rgb(${r},${g},${b});`;\n      }\n\n      \/\/ Hyperlink support\n      let link = cell.hyperlink || null;\n      if (link) {\n        text = `<a href=\"${link}\" target=\"_blank\" rel=\"noopener\">${text}<\/a>`;\n      } else {\n        \/\/ If plain URL, make it clickable\n        text = text.trim();\n        const urlPattern = \/^https?:\\\/\\\/[^\\s]+$\/i;\n        if (urlPattern.test(text)) {\n          text = `<a href=\"${text}\" target=\"_blank\" rel=\"noopener\">${text}<\/a>`;\n        }\n      }\n\n      html += i === 0\n        ? `<th style='padding:5px;${style}'>${text}<\/th>`\n        : `<td style='padding:5px;${style}'>${text}<\/td>`;\n    });\n\n    html += \"<\/tr>\";\n  });\n\n  html += \"<\/table>\";\n  document.getElementById(\"sheet-data\").innerHTML = html;\n}\n\nloadSheetData();\n<\/script>\n\n\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"elementor_header_footer","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-29044","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/lmc.gov.np\/en\/wp-json\/wp\/v2\/pages\/29044","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lmc.gov.np\/en\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/lmc.gov.np\/en\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/lmc.gov.np\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lmc.gov.np\/en\/wp-json\/wp\/v2\/comments?post=29044"}],"version-history":[{"count":15,"href":"https:\/\/lmc.gov.np\/en\/wp-json\/wp\/v2\/pages\/29044\/revisions"}],"predecessor-version":[{"id":29412,"href":"https:\/\/lmc.gov.np\/en\/wp-json\/wp\/v2\/pages\/29044\/revisions\/29412"}],"wp:attachment":[{"href":"https:\/\/lmc.gov.np\/en\/wp-json\/wp\/v2\/media?parent=29044"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}