Skip to content

Commit

Permalink
generateReadme: Refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
FlorentLvr committed Mar 1, 2022
1 parent 5f8044c commit 1595acc
Show file tree
Hide file tree
Showing 5 changed files with 180 additions and 119 deletions.
121 changes: 85 additions & 36 deletions Excel/Excel_Custom_sheet.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -26,32 +26,39 @@
"tags": []
},
"source": [
"# Excel - Custom specific sheet\n",
"<a href=\"https://app.naas.ai/user-redirect/naas/downloader?url=https://raw.githubusercontent.com/jupyter-naas/awesome-notebooks/master/template.ipynb\" target=\"_parent\">\n",
"<img src=\"https://img.shields.io/badge/-Open%20in%20Naas-success?labelColor=000000&logo=data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTAyNHB4IiBoZWlnaHQ9IjEwMjRweCIgdmlld0JveD0iMCAwIDEwMjQgMTAyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgdmVyc2lvbj0iMS4xIj4KIDwhLS0gR2VuZXJhdGVkIGJ5IFBpeGVsbWF0b3IgUHJvIDIuMC41IC0tPgogPGRlZnM+CiAgPHRleHQgaWQ9InN0cmluZyIgdHJhbnNmb3JtPSJtYXRyaXgoMS4wIDAuMCAwLjAgMS4wIDIyOC4wIDU0LjUpIiBmb250LWZhbWlseT0iQ29tZm9ydGFhLVJlZ3VsYXIsIENvbWZvcnRhYSIgZm9udC1zaXplPSI4MDAiIHRleHQtZGVjb3JhdGlvbj0ibm9uZSIgZmlsbD0iI2ZmZmZmZiIgeD0iMS4xOTk5OTk5OTk5OTk5ODg2IiB5PSI3MDUuMCI+bjwvdGV4dD4KIDwvZGVmcz4KIDx1c2UgaWQ9Im4iIHhsaW5rOmhyZWY9IiNzdHJpbmciLz4KPC9zdmc+Cg==\"/>\n",
"</a>"
"# Excel - Custom sheet\n",
"<a href=\"https://app.naas.ai/user-redirect/naas/downloader?url=https://raw.githubusercontent.com/jupyter-naas/awesome-notebooks/master/Excel/Excel_Custom_sheet.ipynb\" target=\"_parent\"><img src=\"https://naasai-public.s3.eu-west-3.amazonaws.com/open_in_naas.svg\"/></a>"
]
},
{
"cell_type": "markdown",
"id": "8a8d50bc-fdaa-48c5-84f6-3bb12beedffe",
"metadata": {},
"metadata": {
"papermill": {},
"tags": []
},
"source": [
"Here below we will apply different formatting on an Excel sheet"
]
},
{
"cell_type": "markdown",
"id": "religious-programmer",
"metadata": {},
"metadata": {
"papermill": {},
"tags": []
},
"source": [
"**Tags:** #excel #openpyxl #font #border #background #naas"
]
},
{
"cell_type": "markdown",
"id": "2a291197-14ba-4e65-95d0-7389081c7036",
"metadata": {},
"metadata": {
"papermill": {},
"tags": []
},
"source": [
"**Author:** [Sébastien Grech](https://www.linkedin.com/in/s%C3%A9bastien-grech-4433a7150/)"
]
Expand All @@ -70,7 +77,10 @@
{
"cell_type": "markdown",
"id": "numeric-mediterranean",
"metadata": {},
"metadata": {
"papermill": {},
"tags": []
},
"source": [
"### Import libraries"
]
Expand All @@ -87,6 +97,7 @@
"shell.execute_reply": "2022-02-24T08:35:53.383447Z",
"shell.execute_reply.started": "2022-02-24T08:35:52.937777Z"
},
"papermill": {},
"tags": []
},
"outputs": [],
Expand All @@ -101,7 +112,10 @@
{
"cell_type": "markdown",
"id": "f602b6d3-91df-4be8-a555-2f51b7391c38",
"metadata": {},
"metadata": {
"papermill": {},
"tags": []
},
"source": [
"### Setup your variables"
]
Expand All @@ -118,6 +132,7 @@
"shell.execute_reply": "2022-02-24T08:35:53.412514Z",
"shell.execute_reply.started": "2022-02-24T08:35:53.398585Z"
},
"papermill": {},
"tags": []
},
"outputs": [],
Expand All @@ -132,7 +147,10 @@
{
"cell_type": "markdown",
"id": "35ea5fd9-265a-4a06-8ab6-b7367ede3683",
"metadata": {},
"metadata": {
"papermill": {},
"tags": []
},
"source": [
"### Setup your custom style\n",
"NB: Colors must be aRGB hex values : 'black' = '000000'"
Expand All @@ -150,6 +168,7 @@
"shell.execute_reply": "2022-02-24T08:35:53.518014Z",
"shell.execute_reply.started": "2022-02-24T08:35:53.420243Z"
},
"papermill": {},
"tags": []
},
"outputs": [],
Expand Down Expand Up @@ -180,7 +199,9 @@
"iopub.status.idle": "2022-02-24T08:35:53.652554Z",
"shell.execute_reply": "2022-02-24T08:35:53.651933Z",
"shell.execute_reply.started": "2022-02-24T08:35:53.520944Z"
}
},
"papermill": {},
"tags": []
},
"outputs": [],
"source": [
Expand All @@ -203,6 +224,7 @@
"shell.execute_reply": "2022-02-24T08:35:53.780797Z",
"shell.execute_reply.started": "2022-02-24T08:35:53.653924Z"
},
"papermill": {},
"tags": []
},
"outputs": [],
Expand Down Expand Up @@ -234,6 +256,7 @@
"shell.execute_reply": "2022-02-24T08:35:53.907934Z",
"shell.execute_reply.started": "2022-02-24T08:35:53.785390Z"
},
"papermill": {},
"tags": []
},
"outputs": [],
Expand All @@ -250,15 +273,21 @@
{
"cell_type": "markdown",
"id": "registered-showcase",
"metadata": {},
"metadata": {
"papermill": {},
"tags": []
},
"source": [
"## Model"
]
},
{
"cell_type": "markdown",
"id": "aggressive-trustee",
"metadata": {},
"metadata": {
"papermill": {},
"tags": []
},
"source": [
"### Load Excel file and get active worksheet"
]
Expand All @@ -275,20 +304,10 @@
"shell.execute_reply": "2022-02-24T08:35:54.087967Z",
"shell.execute_reply.started": "2022-02-24T08:35:53.911138Z"
},
"papermill": {},
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"<Worksheet \"Template\">"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"wb = load_workbook(excel_init_path)\n",
"ws = wb.active\n",
Expand All @@ -298,7 +317,10 @@
{
"cell_type": "markdown",
"id": "tested-astrology",
"metadata": {},
"metadata": {
"papermill": {},
"tags": []
},
"source": [
"### Apply sheet style : Font and border"
]
Expand All @@ -315,6 +337,7 @@
"shell.execute_reply": "2022-02-24T08:35:54.199977Z",
"shell.execute_reply.started": "2022-02-24T08:35:54.100561Z"
},
"papermill": {},
"tags": []
},
"outputs": [],
Expand All @@ -329,7 +352,10 @@
{
"cell_type": "markdown",
"id": "a86a95c8-cf08-44ee-a963-e2e22620e204",
"metadata": {},
"metadata": {
"papermill": {},
"tags": []
},
"source": [
"### Apply number format"
]
Expand All @@ -346,6 +372,7 @@
"shell.execute_reply": "2022-02-24T08:35:54.259922Z",
"shell.execute_reply.started": "2022-02-24T08:35:54.201876Z"
},
"papermill": {},
"tags": []
},
"outputs": [],
Expand All @@ -359,7 +386,10 @@
{
"cell_type": "markdown",
"id": "cda71072-eb15-4eba-b640-5f4f356bd429",
"metadata": {},
"metadata": {
"papermill": {},
"tags": []
},
"source": [
"### Apply header format"
]
Expand All @@ -375,7 +405,9 @@
"iopub.status.idle": "2022-02-24T08:35:54.276431Z",
"shell.execute_reply": "2022-02-24T08:35:54.275912Z",
"shell.execute_reply.started": "2022-02-24T08:35:54.261938Z"
}
},
"papermill": {},
"tags": []
},
"outputs": [],
"source": [
Expand All @@ -387,7 +419,10 @@
{
"cell_type": "markdown",
"id": "97110657-32e6-46c8-ab78-d5c20703f5c4",
"metadata": {},
"metadata": {
"papermill": {},
"tags": []
},
"source": [
"### Apply total format"
]
Expand All @@ -403,7 +438,9 @@
"iopub.status.idle": "2022-02-24T08:35:54.380645Z",
"shell.execute_reply": "2022-02-24T08:35:54.380004Z",
"shell.execute_reply.started": "2022-02-24T08:35:54.277606Z"
}
},
"papermill": {},
"tags": []
},
"outputs": [],
"source": [
Expand All @@ -421,7 +458,9 @@
"iopub.status.idle": "2021-07-02T23:32:10.796900Z",
"shell.execute_reply": "2021-07-02T23:32:10.796358Z",
"shell.execute_reply.started": "2021-07-02T23:32:10.789033Z"
}
},
"papermill": {},
"tags": []
},
"source": [
"## Output"
Expand All @@ -430,7 +469,10 @@
{
"cell_type": "markdown",
"id": "linear-address",
"metadata": {},
"metadata": {
"papermill": {},
"tags": []
},
"source": [
"### Save new excel"
]
Expand All @@ -447,6 +489,7 @@
"shell.execute_reply": "2022-02-24T08:35:54.543934Z",
"shell.execute_reply.started": "2022-02-24T08:35:54.381836Z"
},
"papermill": {},
"tags": []
},
"outputs": [],
Expand All @@ -457,7 +500,10 @@
{
"cell_type": "markdown",
"id": "446cdd9f-b9dc-41f1-9892-f49b90a146be",
"metadata": {},
"metadata": {
"papermill": {},
"tags": []
},
"source": [
"### Share your excel"
]
Expand All @@ -466,7 +512,10 @@
"cell_type": "code",
"execution_count": null,
"id": "2e96ab58-5454-4700-bfc7-a1417417491d",
"metadata": {},
"metadata": {
"papermill": {},
"tags": []
},
"outputs": [],
"source": [
"naas.asset.add(excel_out_path)"
Expand Down Expand Up @@ -507,4 +556,4 @@
},
"nbformat": 4,
"nbformat_minor": 5
}
}
Loading

0 comments on commit 1595acc

Please sign in to comment.