update,
This commit is contained in:
9
docker-share/Dockerfile
Normal file
9
docker-share/Dockerfile
Normal file
@@ -0,0 +1,9 @@
|
||||
# CREDIT: https://github.com/shren207/nextjs-docker-compose
|
||||
# Dockerfile
|
||||
FROM node:18-buster
|
||||
|
||||
RUN mkdir -p /app/node_modules
|
||||
RUN chown 1000:1000 -R /app
|
||||
WORKDIR /app
|
||||
|
||||
USER 1000:1000
|
5
docker-share/app/entry.sh
Normal file
5
docker-share/app/entry.sh
Normal file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
set -ex
|
||||
|
||||
npm i
|
||||
npm run start
|
2117
docker-share/app/package-lock.json
generated
Normal file
2117
docker-share/app/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
17
docker-share/app/package.json
Normal file
17
docker-share/app/package.json
Normal file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "app",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"start": "http-server --cors ./public"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"http-server": "^14.1.1",
|
||||
"serve": "^14.2.0"
|
||||
}
|
||||
}
|
12
docker-share/app/public/index.html
Normal file
12
docker-share/app/public/index.html
Normal file
@@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<title>Document</title>
|
||||
</head>
|
||||
<body>
|
||||
helloworld
|
||||
</body>
|
||||
</html>
|
31
docker-share/docker-compose.yml
Normal file
31
docker-share/docker-compose.yml
Normal file
@@ -0,0 +1,31 @@
|
||||
# CREDIT: https://github.com/shren207/nextjs-docker-compose
|
||||
services:
|
||||
leewinnie818_share:
|
||||
container_name: leewinnie818_share
|
||||
build: .
|
||||
restart: always
|
||||
volumes:
|
||||
- $PWD/app:/app
|
||||
- leewinnie818_node_modules:/app/node_modules
|
||||
working_dir: /app
|
||||
# command: sleep infinity
|
||||
command: bash entry.sh
|
||||
|
||||
labels:
|
||||
- "traefik.enable=true"
|
||||
- "traefik.http.routers.leewinnie818-http.rule=Host(`leewinnie818.louislabs.com`)"
|
||||
- "traefik.http.routers.leewinnie818-http.entrypoints=web"
|
||||
- "traefik.http.routers.leewinnie818-http.middlewares=leewinnie818-https"
|
||||
- "traefik.http.middlewares.leewinnie818-https.redirectscheme.scheme=https"
|
||||
- "traefik.http.routers.leewinnie818.rule=Host(`leewinnie818.louislabs.com`)"
|
||||
- "traefik.http.routers.leewinnie818.entrypoints=websecure"
|
||||
- "traefik.http.routers.leewinnie818.tls.certresolver=myresolver"
|
||||
- "traefik.http.services.leewinnie818.loadbalancer.server.port=8080"
|
||||
|
||||
networks:
|
||||
default:
|
||||
external:
|
||||
name: traefik-proxy-network
|
||||
|
||||
volumes:
|
||||
leewinnie818_node_modules:
|
13
docker-share/package.json
Normal file
13
docker-share/package.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"name": "docker-helloworld",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"into_docker": "docker compose exec -it test bash"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC"
|
||||
}
|
10
docker-share/up.sh
Normal file
10
docker-share/up.sh
Normal file
@@ -0,0 +1,10 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
git pull
|
||||
|
||||
docker compose pull
|
||||
docker compose build
|
||||
docker compose kill
|
||||
docker compose down
|
||||
docker compose up -d
|
||||
docker compose logs -f
|
15
firebase-share/.firebaserc
Normal file
15
firebase-share/.firebaserc
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"projects": {
|
||||
"default": "showcase-12664"
|
||||
},
|
||||
"targets": {
|
||||
"showcase-12664": {
|
||||
"hosting": {
|
||||
"leewinnie818-page": [
|
||||
"leewinnie818-page"
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"etags": {}
|
||||
}
|
66
firebase-share/.gitignore
vendored
Normal file
66
firebase-share/.gitignore
vendored
Normal file
@@ -0,0 +1,66 @@
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
firebase-debug.log*
|
||||
firebase-debug.*.log*
|
||||
|
||||
# Firebase cache
|
||||
.firebase/
|
||||
|
||||
# Firebase config
|
||||
|
||||
# Uncomment this if you'd like others to create their own Firebase project.
|
||||
# For a team working on the same Firebase project(s), it is recommended to leave
|
||||
# it commented so all members can deploy to the same project(s) in .firebaserc.
|
||||
# .firebaserc
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
*.pid.lock
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
|
||||
# nyc test coverage
|
||||
.nyc_output
|
||||
|
||||
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
|
||||
.grunt
|
||||
|
||||
# Bower dependency directory (https://bower.io/)
|
||||
bower_components
|
||||
|
||||
# node-waf configuration
|
||||
.lock-wscript
|
||||
|
||||
# Compiled binary addons (http://nodejs.org/api/addons.html)
|
||||
build/Release
|
||||
|
||||
# Dependency directories
|
||||
node_modules/
|
||||
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
# Optional eslint cache
|
||||
.eslintcache
|
||||
|
||||
# Optional REPL history
|
||||
.node_repl_history
|
||||
|
||||
# Output of 'npm pack'
|
||||
*.tgz
|
||||
|
||||
# Yarn Integrity file
|
||||
.yarn-integrity
|
||||
|
||||
# dotenv environment variables file
|
||||
.env
|
6
firebase-share/firebase.json
Normal file
6
firebase-share/firebase.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"hosting": [ {
|
||||
"target": "leewinnie818-page",
|
||||
"public": "public"
|
||||
} ]
|
||||
}
|
21
firebase-share/package.json
Normal file
21
firebase-share/package.json
Normal file
@@ -0,0 +1,21 @@
|
||||
{
|
||||
"name": "ddmseoul",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"start": "http-server",
|
||||
"deploy": "firebase deploy",
|
||||
"emulate":"firebase emulators:start --only hosting",
|
||||
"gitUpdate": "git add . && git commit -m'update,'&& git push",
|
||||
"uglifyjs":"uglifyjs --compress toplevel --mangle --mangle-props -o public/scripts.js -- public/scripts-src.js "
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"devDependencies": {
|
||||
"http-server": "^14.1.1",
|
||||
"uglify-js": "^3.17.4"
|
||||
}
|
||||
}
|
33
firebase-share/public/404.html
Normal file
33
firebase-share/public/404.html
Normal file
@@ -0,0 +1,33 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Page Not Found</title>
|
||||
|
||||
<style media="screen">
|
||||
body { background: #ECEFF1; color: rgba(0,0,0,0.87); font-family: Roboto, Helvetica, Arial, sans-serif; margin: 0; padding: 0; }
|
||||
#message { background: white; max-width: 360px; margin: 100px auto 16px; padding: 32px 24px 16px; border-radius: 3px; }
|
||||
#message h3 { color: #888; font-weight: normal; font-size: 16px; margin: 16px 0 12px; }
|
||||
#message h2 { color: #ffa100; font-weight: bold; font-size: 16px; margin: 0 0 8px; }
|
||||
#message h1 { font-size: 22px; font-weight: 300; color: rgba(0,0,0,0.6); margin: 0 0 16px;}
|
||||
#message p { line-height: 140%; margin: 16px 0 24px; font-size: 14px; }
|
||||
#message a { display: block; text-align: center; background: #039be5; text-transform: uppercase; text-decoration: none; color: white; padding: 16px; border-radius: 4px; }
|
||||
#message, #message a { box-shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24); }
|
||||
#load { color: rgba(0,0,0,0.4); text-align: center; font-size: 13px; }
|
||||
@media (max-width: 600px) {
|
||||
body, #message { margin-top: 0; background: white; box-shadow: none; }
|
||||
body { border-top: 16px solid #ffa100; }
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="message">
|
||||
<h2>404</h2>
|
||||
<h1>Page Not Found</h1>
|
||||
<p>The specified file was not found on this website. Please check the URL for mistakes and try again.</p>
|
||||
<h3>Why am I seeing this?</h3>
|
||||
<p>This page was generated by the Firebase Command-Line Interface. To modify it, edit the <code>404.html</code> file in your project's configured <code>public</code> directory.</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
31
firebase-share/public/index.html
Normal file
31
firebase-share/public/index.html
Normal file
@@ -0,0 +1,31 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>Bootstrap demo</title>
|
||||
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous">
|
||||
</head>
|
||||
<body>
|
||||
<div style="padding: 1rem">
|
||||
<h3>Excel to powerpoint automation</h3>
|
||||
<div>
|
||||
<div>
|
||||
<a href="/fake-kos.html?EDM_goto=jobs-featured">add-pp7</a>
|
||||
</div>
|
||||
<div>
|
||||
<a href="/fake-kos.html?EDM_goto=consultants-featured">goto consultants-featured</a>
|
||||
</div>
|
||||
<div>
|
||||
<a href="/fake-kos.html?EDM_goto=our_brands">goto our_brands</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/js/bootstrap.bundle.min.js" integrity="sha384-w76AqPfDkMBDXo30jS1Sgez6pr3x5MlQ1ZAGC+nuZB+EYdgRZgiwxhTBTkF7CXvN" crossorigin="anonymous"></script>
|
||||
|
||||
<script src="scripts.js"></script>
|
||||
<script>
|
||||
console.log('hello from louiscklaw.github.io')
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
1
firebase-share/readme.md
Normal file
1
firebase-share/readme.md
Normal file
@@ -0,0 +1 @@
|
||||
firebase share
|
BIN
fix-page-number/202212 monthly report - Template-try2 _page.xlsm
Normal file
BIN
fix-page-number/202212 monthly report - Template-try2 _page.xlsm
Normal file
Binary file not shown.
BIN
fix-page-number/Template(R2)coverpage.pptx
Normal file
BIN
fix-page-number/Template(R2)coverpage.pptx
Normal file
Binary file not shown.
BIN
fix-page-number/Template(R2)coverpage.pptx.original
Normal file
BIN
fix-page-number/Template(R2)coverpage.pptx.original
Normal file
Binary file not shown.
5
fix-page-number/reset.ps1
Normal file
5
fix-page-number/reset.ps1
Normal file
@@ -0,0 +1,5 @@
|
||||
rm 'Template(R2)coverpage.pptx'
|
||||
|
||||
timeout 1
|
||||
|
||||
copy 'Template(R2)coverpage.pptx.original' 'Template(R2)coverpage.pptx'
|
BIN
fix/Template(R1)result.pptx
Normal file
BIN
fix/Template(R1)result.pptx
Normal file
Binary file not shown.
7
gitUpdate.bat
Normal file
7
gitUpdate.bat
Normal file
@@ -0,0 +1,7 @@
|
||||
git status .
|
||||
|
||||
@pause
|
||||
|
||||
git add .
|
||||
git commit -m"update leewinnie818,"
|
||||
start git push
|
10
job1-2013/build_delivery.bat
Normal file
10
job1-2013/build_delivery.bat
Normal file
@@ -0,0 +1,10 @@
|
||||
rmdir /s /q delivery
|
||||
|
||||
mkdir delivery\1
|
||||
mkdir delivery\2
|
||||
|
||||
copy "excel-to-powerpoint-reporting\delivery-copy1\202212 monthly report - Template.xlsm" delivery\1
|
||||
copy "excel-to-powerpoint-reporting\delivery-copy1\Template.pptx" delivery\1
|
||||
|
||||
copy "excel-to-powerpoint-reporting\delivery-copy2\202212 monthly report - Template.xlsm" delivery\2
|
||||
copy "excel-to-powerpoint-reporting\delivery-copy2\Template.pptx" delivery\2
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
|
||||
xlwings vba edit
|
Binary file not shown.
Binary file not shown.
22
job1-2013/excel-to-powerpoint-reporting/package.json
Normal file
22
job1-2013/excel-to-powerpoint-reporting/package.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"name": "excel-to-powerpoint-reporting",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"directories": {
|
||||
"doc": "docs"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"gitUpdate": "git add . && git commit -m\"update excel-to-powerpoint-reporting,\" && git push"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@fortawesome/free-solid-svg-icons": "^6.2.1",
|
||||
"@fortawesome/react-fontawesome": "^0.2.0",
|
||||
"bootstrap": "^5.2.3",
|
||||
"react-bootstrap": "^2.6.0"
|
||||
}
|
||||
}
|
Binary file not shown.
BIN
job1-update-adding-number-format/Template.pptx
Normal file
BIN
job1-update-adding-number-format/Template.pptx
Normal file
Binary file not shown.
BIN
job1-update-adding-number-format/test_sample.ods
Normal file
BIN
job1-update-adding-number-format/test_sample.ods
Normal file
Binary file not shown.
BIN
job1-update-adding-number-format/test_sample.xlsm
Normal file
BIN
job1-update-adding-number-format/test_sample.xlsm
Normal file
Binary file not shown.
BIN
job1-update-adding-number-format/test_sample.xlsx
Normal file
BIN
job1-update-adding-number-format/test_sample.xlsx
Normal file
Binary file not shown.
BIN
job1-update/202212 monthly report - Template.xlsm
Normal file
BIN
job1-update/202212 monthly report - Template.xlsm
Normal file
Binary file not shown.
BIN
job1-update/Template.pptx
Normal file
BIN
job1-update/Template.pptx
Normal file
Binary file not shown.
BIN
job1/Book1.xlsm
Normal file
BIN
job1/Book1.xlsm
Normal file
Binary file not shown.
BIN
job1/Copy Excel Data into PowerPoint.xlsm
Normal file
BIN
job1/Copy Excel Data into PowerPoint.xlsm
Normal file
Binary file not shown.
10
job1/build_delivery.bat
Normal file
10
job1/build_delivery.bat
Normal file
@@ -0,0 +1,10 @@
|
||||
rmdir /s /q delivery
|
||||
|
||||
mkdir delivery\1
|
||||
mkdir delivery\2
|
||||
|
||||
copy "excel-to-powerpoint-reporting\delivery-copy1\202212 monthly report - Template.xlsm" delivery\1
|
||||
copy "excel-to-powerpoint-reporting\delivery-copy1\Template.pptx" delivery\1
|
||||
|
||||
copy "excel-to-powerpoint-reporting\delivery-copy2\202212 monthly report - Template.xlsm" delivery\2
|
||||
copy "excel-to-powerpoint-reporting\delivery-copy2\Template.pptx" delivery\2
|
BIN
job1/delivery-tryout/202212 monthly report - Template.xlsm
Normal file
BIN
job1/delivery-tryout/202212 monthly report - Template.xlsm
Normal file
Binary file not shown.
BIN
job1/delivery-tryout/202212 monthly report - Template.xlsx
Normal file
BIN
job1/delivery-tryout/202212 monthly report - Template.xlsx
Normal file
Binary file not shown.
BIN
job1/delivery-tryout/Template.pptx
Normal file
BIN
job1/delivery-tryout/Template.pptx
Normal file
Binary file not shown.
Binary file not shown.
BIN
job1/excel-to-powerpoint-reporting/delivery-copy1/Template.pptx
Normal file
BIN
job1/excel-to-powerpoint-reporting/delivery-copy1/Template.pptx
Normal file
Binary file not shown.
Binary file not shown.
395
job1/excel-to-powerpoint-reporting/delivery-copy2/Module1.bas
Normal file
395
job1/excel-to-powerpoint-reporting/delivery-copy2/Module1.bas
Normal file
@@ -0,0 +1,395 @@
|
||||
Option Explicit
|
||||
|
||||
Dim ppt As PowerPoint.Application
|
||||
Dim pres As PowerPoint.Presentation
|
||||
|
||||
Dim sl As PowerPoint.Slide
|
||||
Dim cl As PowerPoint.CustomLayout
|
||||
Dim sh As PowerPoint.ShapeRange
|
||||
|
||||
Dim pres_right As Integer
|
||||
Dim pres_left As Integer
|
||||
Dim pres_title_top As Integer
|
||||
Dim pres_body_top As Integer
|
||||
|
||||
Dim cell_this_month_income As String
|
||||
Dim rngETA As Range
|
||||
Dim rngActive As Range
|
||||
|
||||
Dim textCellList(5) As String
|
||||
|
||||
Dim alphabatList(6) As String
|
||||
Dim numberList(17 - 8) As String
|
||||
|
||||
|
||||
Sub ReplaceInPowerPoint(text_look_for As String, text_replace As String, look_into_slide As Integer)
|
||||
' MsgBox text_look_for,,"title"
|
||||
' MsgBox text_replace,,"title"
|
||||
' MsgBox look_into_slide,,"title"
|
||||
Debug.Print ppt
|
||||
|
||||
Dim oSld As Slide
|
||||
Set oSld = ppt.ActivePresentation.Slides(look_into_slide)
|
||||
|
||||
|
||||
Dim shp As PowerPoint.Shape
|
||||
Dim i As Integer
|
||||
Dim j As Integer
|
||||
Dim temp As String
|
||||
' Dim text_look_for, text_replace As String
|
||||
Dim exitLoop As Boolean
|
||||
|
||||
exitLoop = False
|
||||
For Each shp In oSld.Shapes
|
||||
If shp.HasTable Then
|
||||
For i = 1 To shp.Table.Rows.Count
|
||||
For j = 1 To shp.Table.Columns.Count
|
||||
temp = shp.Table.Rows.item(i).Cells(j).Shape.TextFrame.TextRange.Text
|
||||
If (InStr(1, temp, text_look_for) > 0) Then
|
||||
shp.Table.Rows.item(i).Cells(j).Shape.TextFrame.TextRange.Text = _
|
||||
Replace(temp, text_look_for, text_replace)
|
||||
exitLoop = True
|
||||
|
||||
If (exitLoop) Then
|
||||
Debug.Print "exit j"
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
Next j
|
||||
|
||||
If (exitLoop) Then
|
||||
Debug.Print "exit i"
|
||||
Exit For
|
||||
End If
|
||||
Next i
|
||||
End If
|
||||
|
||||
If (exitLoop) Then
|
||||
Debug.Print "exit shp"
|
||||
Exit For
|
||||
End If
|
||||
Next shp
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Sub updateStatus(msg As String)
|
||||
Range("A1:A1").Value = msg
|
||||
End Sub
|
||||
|
||||
Sub replaceInSlide0(startChar As String, endChar As String, startNum As Integer, endNum As Integer)
|
||||
' msgbox startChar & startNum
|
||||
' msgbox endChar & endNum
|
||||
|
||||
Dim i As Integer
|
||||
Dim j As Integer
|
||||
Dim textCell As Variant
|
||||
Dim activeSheet As Integer
|
||||
activeSheet = 1
|
||||
|
||||
|
||||
updateStatus "replaceInSlide0"
|
||||
|
||||
For i = Asc(startChar) To Asc(endChar)
|
||||
For j = startNum To endNum
|
||||
textCell = Chr(i) & j
|
||||
Set rngActive = Range(textCell & ":" & textCell)
|
||||
updateStatus "replaceInSlide0" & textCell & ":" & textCell
|
||||
|
||||
If (Chr(i) = "F" Or j = 16) Then
|
||||
' intented empty
|
||||
Else
|
||||
If (Chr(i) = "E" Or Chr(i) = "I") Then
|
||||
If (rngActive.Value >= 1) Then
|
||||
ReplaceInPowerPoint "\E" & textCell, "100" & "%", activeSheet
|
||||
ElseIf (rngActive.Value = -0.1) Then
|
||||
ReplaceInPowerPoint "\E" & textCell, "0" & "%", activeSheet
|
||||
ElseIf (rngActive.Value < -1) Then
|
||||
ReplaceInPowerPoint "\E" & textCell, "N/A", activeSheet
|
||||
ElseIf (rngActive.Value < 0) Then
|
||||
ReplaceInPowerPoint "\E" & textCell, "-", activeSheet
|
||||
Else
|
||||
ReplaceInPowerPoint "\E" & textCell, Round(rngActive.Value * 100, 0) & "%", activeSheet
|
||||
End If
|
||||
Else
|
||||
If (rngActive.Value < 0) Then
|
||||
ReplaceInPowerPoint "\E" & textCell, "(" & Abs(rngActive.Value) & ")", activeSheet
|
||||
Else
|
||||
ReplaceInPowerPoint "\E" & textCell, rngActive.Value, activeSheet
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Next j
|
||||
Next i
|
||||
|
||||
End Sub
|
||||
|
||||
Sub replaceInSlide1(startChar As String, endChar As String, startNum As Integer, endNum As Integer)
|
||||
' msgbox startChar & startNum
|
||||
' msgbox endChar & endNum
|
||||
|
||||
Dim i As Integer
|
||||
Dim j As Integer
|
||||
Dim textCell As Variant
|
||||
|
||||
Dim activeSheet As Integer
|
||||
activeSheet = 2
|
||||
|
||||
updateStatus "replaceInSlide1"
|
||||
|
||||
For i = Asc(startChar) To Asc(endChar)
|
||||
For j = startNum To endNum
|
||||
textCell = Chr(i) & j
|
||||
Set rngActive = Range(textCell & ":" & textCell)
|
||||
updateStatus "replaceInSlide1" & textCell & ":" & textCell
|
||||
|
||||
If (Chr(i) = "E" Or Chr(i) = "I") Then
|
||||
If (rngActive.Value >= 1) Then
|
||||
ReplaceInPowerPoint "\E" & textCell, "100" & "%", activeSheet
|
||||
ElseIf (rngActive.Value = -0.1) Then
|
||||
ReplaceInPowerPoint "\E" & textCell, "0" & "%", activeSheet
|
||||
ElseIf (rngActive.Value < -1) Then
|
||||
ReplaceInPowerPoint "\E" & textCell, "N/A", activeSheet
|
||||
ElseIf (rngActive.Value < 0) Then
|
||||
ReplaceInPowerPoint "\E" & textCell, "-", activeSheet
|
||||
Else
|
||||
ReplaceInPowerPoint "\E" & textCell, Round(rngActive.Value * 100, 0) & "%", activeSheet
|
||||
End If
|
||||
Else
|
||||
If (rngActive.Value < 0) Then
|
||||
ReplaceInPowerPoint "\E" & textCell, "(" & Abs(rngActive.Value) & ")", activeSheet
|
||||
Else
|
||||
ReplaceInPowerPoint "\E" & textCell, rngActive.Value, activeSheet
|
||||
End If
|
||||
End If
|
||||
Next j
|
||||
Next i
|
||||
|
||||
End Sub
|
||||
|
||||
Sub replaceInSlide2(startChar As String, endChar As String, startNum As Integer, endNum As Integer)
|
||||
' msgbox startChar & startNum
|
||||
' msgbox endChar & endNum
|
||||
|
||||
Dim i As Integer
|
||||
Dim j As Integer
|
||||
Dim textCell As Variant
|
||||
Dim activeSheet As Integer
|
||||
activeSheet = 3
|
||||
|
||||
updateStatus "replaceInSlide2"
|
||||
|
||||
For i = Asc(startChar) To Asc(endChar)
|
||||
For j = startNum To endNum
|
||||
textCell = Chr(i) & j
|
||||
Set rngActive = Range(textCell & ":" & textCell)
|
||||
updateStatus "replaceInSlide2" & textCell & ":" & textCell
|
||||
If (Chr(i) = "D") Then
|
||||
If (rngActive.Value >= 1) Then
|
||||
ReplaceInPowerPoint "\E" & textCell, "100" & "%", activeSheet
|
||||
ElseIf (rngActive.Value = -0.1) Then
|
||||
ReplaceInPowerPoint "\E" & textCell, "0" & "%", activeSheet
|
||||
ElseIf (rngActive.Value < -1) Then
|
||||
ReplaceInPowerPoint "\E" & textCell, "N/A", activeSheet
|
||||
ElseIf (rngActive.Value < 0) Then
|
||||
ReplaceInPowerPoint "\E" & textCell, "-", activeSheet
|
||||
Else
|
||||
ReplaceInPowerPoint "\E" & textCell, Round(rngActive.Value * 100, 0) & "%", activeSheet
|
||||
End If
|
||||
Else
|
||||
If (rngActive.Value < 0) Then
|
||||
ReplaceInPowerPoint "\E" & textCell, "(" & Abs(rngActive.Value) & ")", activeSheet
|
||||
Else
|
||||
ReplaceInPowerPoint "\E" & textCell, rngActive.Value, activeSheet
|
||||
End If
|
||||
End If
|
||||
Next j
|
||||
Next i
|
||||
|
||||
End Sub
|
||||
|
||||
Sub replaceInSlide3(startChar As String, endChar As String, startNum As Integer, endNum As Integer)
|
||||
' msgbox startChar & startNum
|
||||
' msgbox endChar & endNum
|
||||
|
||||
Dim i As Integer
|
||||
Dim j As Integer
|
||||
Dim textCell As Variant
|
||||
Dim activeSheet As Integer
|
||||
activeSheet = 4
|
||||
|
||||
updateStatus "replaceInSlide3"
|
||||
|
||||
For i = Asc(startChar) To Asc(endChar)
|
||||
For j = startNum To endNum
|
||||
textCell = Chr(i) & j
|
||||
Set rngActive = Range(textCell & ":" & textCell)
|
||||
updateStatus "replaceInSlide3" & textCell & ":" & textCell
|
||||
If (Chr(i) = "D") Then
|
||||
If (rngActive.Value >= 1) Then
|
||||
ReplaceInPowerPoint "\E" & textCell, "100" & "%", activeSheet
|
||||
ElseIf (rngActive.Value = -0.1) Then
|
||||
ReplaceInPowerPoint "\E" & textCell, "0" & "%", activeSheet
|
||||
ElseIf (rngActive.Value < -1) Then
|
||||
ReplaceInPowerPoint "\E" & textCell, "N/A", activeSheet
|
||||
ElseIf (rngActive.Value < 0) Then
|
||||
ReplaceInPowerPoint "\E" & textCell, "-", activeSheet
|
||||
Else
|
||||
ReplaceInPowerPoint "\E" & textCell, Round(rngActive.Value * 100, 0) & "%", activeSheet
|
||||
End If
|
||||
Else
|
||||
If (rngActive.Value < 0) Then
|
||||
ReplaceInPowerPoint "\E" & textCell, "(" & Abs(rngActive.Value) & ")", activeSheet
|
||||
Else
|
||||
ReplaceInPowerPoint "\E" & textCell, rngActive.Value, activeSheet
|
||||
End If
|
||||
End If
|
||||
Next j
|
||||
Next i
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Sub replaceInSlide4(startChar As String, endChar As String, startNum As Integer, endNum As Integer)
|
||||
' msgbox startChar & startNum
|
||||
' msgbox endChar & endNum
|
||||
|
||||
Dim i As Integer
|
||||
Dim j As Integer
|
||||
Dim textCell As Variant
|
||||
Dim activeSheet As Integer
|
||||
activeSheet = 5
|
||||
|
||||
updateStatus "replaceInSlide4"
|
||||
|
||||
For i = Asc(startChar) To Asc(endChar)
|
||||
For j = startNum To endNum
|
||||
textCell = Chr(i) & j
|
||||
Set rngActive = Range(textCell & ":" & textCell)
|
||||
updateStatus "replaceInSlide4" & textCell & ":" & textCell
|
||||
|
||||
Debug.Print textCell & "||Value||" & rngActive.Value
|
||||
Debug.Print textCell & "||text||" & rngActive.Text
|
||||
|
||||
If (Chr(i) = "D") Then
|
||||
If (rngActive.Value = "-") Then
|
||||
ReplaceInPowerPoint "\E" & textCell, "-", activeSheet
|
||||
ElseIf (rngActive.Value = "N/A") Then
|
||||
ReplaceInPowerPoint "\E" & textCell, "N/A", activeSheet
|
||||
ElseIf (rngActive.Value >= 1) Then
|
||||
ReplaceInPowerPoint "\E" & textCell, "100" & "%", activeSheet
|
||||
ElseIf (rngActive.Value = -0.1) Then
|
||||
ReplaceInPowerPoint "\E" & textCell, "0" & "%", activeSheet
|
||||
ElseIf (rngActive.Value < -1) Then
|
||||
ReplaceInPowerPoint "\E" & textCell, "N/A", activeSheet
|
||||
ElseIf (rngActive.Value < 0) Then
|
||||
ReplaceInPowerPoint "\E" & textCell, "-", activeSheet
|
||||
ElseIf (rngActive.Value = 0) Then
|
||||
ReplaceInPowerPoint "\E" & textCell, "-", activeSheet
|
||||
Else
|
||||
ReplaceInPowerPoint "\E" & textCell, Round(rngActive.Value * 100, 0) & "%", activeSheet
|
||||
End If
|
||||
Else
|
||||
If (rngActive.Text = "0") Then
|
||||
ReplaceInPowerPoint "\E" & textCell, "-", activeSheet
|
||||
Else
|
||||
ReplaceInPowerPoint "\E" & textCell, rngActive.Value, activeSheet
|
||||
End If
|
||||
End If
|
||||
Next j
|
||||
Next i
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Sub replaceInSlide5(startChar As String, endChar As String, startNum As Integer, endNum As Integer)
|
||||
' msgbox startChar & startNum
|
||||
' msgbox endChar & endNum
|
||||
|
||||
Dim i As Integer
|
||||
Dim j As Integer
|
||||
Dim textCell As Variant
|
||||
Dim activeSheet As Integer
|
||||
activeSheet = 6
|
||||
updateStatus "replaceInSlide5"
|
||||
|
||||
For i = Asc(startChar) To Asc(endChar)
|
||||
For j = startNum To endNum
|
||||
textCell = Chr(i) & j
|
||||
Set rngActive = Range(textCell & ":" & textCell)
|
||||
updateStatus "replaceInSlide5" & textCell & ":" & textCell
|
||||
If (Chr(i) = "E" Or Chr(i) = "I") Then
|
||||
If (rngActive.Value >= 1) Then
|
||||
ReplaceInPowerPoint "\E" & textCell, "100" & "%", activeSheet
|
||||
ElseIf (rngActive.Value = -0.1) Then
|
||||
ReplaceInPowerPoint "\E" & textCell, "0" & "%", activeSheet
|
||||
ElseIf (rngActive.Value < -1) Then
|
||||
ReplaceInPowerPoint "\E" & textCell, "N/A", activeSheet
|
||||
ElseIf (rngActive.Value < 0) Then
|
||||
ReplaceInPowerPoint "\E" & textCell, "-", activeSheet
|
||||
Else
|
||||
ReplaceInPowerPoint "\E" & textCell, Round(rngActive.Value * 100, 0) & "%", activeSheet
|
||||
End If
|
||||
Else
|
||||
If (rngActive.Value < 0) Then
|
||||
ReplaceInPowerPoint "\E" & textCell, "(" & Abs(rngActive.Value) & ")", activeSheet
|
||||
Else
|
||||
ReplaceInPowerPoint "\E" & textCell, rngActive.Value, activeSheet
|
||||
End If
|
||||
End If
|
||||
Next j
|
||||
Next i
|
||||
|
||||
End Sub
|
||||
|
||||
Sub replaceInSlide6(startChar As String, endChar As String, startNum As Integer, endNum As Integer)
|
||||
' msgbox startChar & startNum
|
||||
' msgbox endChar & endNum
|
||||
|
||||
Dim i As Integer
|
||||
Dim j As Integer
|
||||
Dim textCell As Variant
|
||||
Dim activeSheet As Integer
|
||||
activeSheet = 7
|
||||
updateStatus "replaceInSlide6"
|
||||
|
||||
For i = Asc(startChar) To Asc(endChar)
|
||||
For j = startNum To endNum
|
||||
textCell = Chr(i) & j
|
||||
Set rngActive = Range(textCell & ":" & textCell)
|
||||
updateStatus "replaceInSlide6" & textCell & ":" & textCell
|
||||
|
||||
If (rngActive.Value >= 1) Then
|
||||
ReplaceInPowerPoint "\E" & textCell, "100" & "%", activeSheet
|
||||
ElseIf (rngActive.Value = -0.1) Then
|
||||
ReplaceInPowerPoint "\E" & textCell, "0" & "%", activeSheet
|
||||
ElseIf (rngActive.Value < -1) Then
|
||||
ReplaceInPowerPoint "\E" & textCell, "N/A", activeSheet
|
||||
ElseIf (rngActive.Value < 0) Then
|
||||
ReplaceInPowerPoint "\E" & textCell, "-", activeSheet
|
||||
Else
|
||||
ReplaceInPowerPoint "\E" & textCell, Round(rngActive.Value * 100, 0) & "%", activeSheet
|
||||
End If
|
||||
Next j
|
||||
Next i
|
||||
|
||||
End Sub
|
||||
|
||||
Sub Main()
|
||||
Set ppt = New PowerPoint.Application
|
||||
Set pres = ppt.Presentations.Open(ActiveWorkbook.Path + "\" + "Template.pptx", msoFalse)
|
||||
|
||||
replaceInSlide0 "C", "I", 9, 17
|
||||
replaceInSlide1 "C", "I",31, 38
|
||||
replaceInSlide2 "B", "D",49, 58
|
||||
replaceInSlide3 "C", "E",71, 74
|
||||
replaceInSlide4 "B", "D", 79, 92
|
||||
replaceInSlide5 "C", "E",102, 107
|
||||
replaceInSlide6 "B", "D",119, 125
|
||||
|
||||
MsgBox "done"
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
BIN
job1/excel-to-powerpoint-reporting/delivery-copy2/Template.pptx
Normal file
BIN
job1/excel-to-powerpoint-reporting/delivery-copy2/Template.pptx
Normal file
Binary file not shown.
@@ -0,0 +1 @@
|
||||
xlwings vba edit
|
Binary file not shown.
Binary file not shown.
22
job1/excel-to-powerpoint-reporting/package.json
Normal file
22
job1/excel-to-powerpoint-reporting/package.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"name": "excel-to-powerpoint-reporting",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"directories": {
|
||||
"doc": "docs"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"gitUpdate": "git add . && git commit -m\"update excel-to-powerpoint-reporting,\" && git push"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@fortawesome/free-solid-svg-icons": "^6.2.1",
|
||||
"@fortawesome/react-fontawesome": "^0.2.0",
|
||||
"bootstrap": "^5.2.3",
|
||||
"react-bootstrap": "^2.6.0"
|
||||
}
|
||||
}
|
BIN
job1_ref/SsG0xP5mrq.png
(Stored with Git LFS)
Normal file
BIN
job1_ref/SsG0xP5mrq.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
job1_ref/eVML50eZx1.png
(Stored with Git LFS)
Normal file
BIN
job1_ref/eVML50eZx1.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
job1_ref/jI6W5eY9gW.png
(Stored with Git LFS)
Normal file
BIN
job1_ref/jI6W5eY9gW.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
job2/AR-updated Jan2023-Test.xls
Normal file
BIN
job2/AR-updated Jan2023-Test.xls
Normal file
Binary file not shown.
BIN
job3/add-pp7/202212 monthly report - Template-try1.xlsm
Normal file
BIN
job3/add-pp7/202212 monthly report - Template-try1.xlsm
Normal file
Binary file not shown.
BIN
job3/add-pp7/202212 monthly report - Template.xlsm
Normal file
BIN
job3/add-pp7/202212 monthly report - Template.xlsm
Normal file
Binary file not shown.
BIN
job3/add-pp7/Template(R1).pptx
Normal file
BIN
job3/add-pp7/Template(R1).pptx
Normal file
Binary file not shown.
BIN
job3/add-pp7/Template(R1)_result.pptx
Normal file
BIN
job3/add-pp7/Template(R1)_result.pptx
Normal file
Binary file not shown.
BIN
job3/add-pp7/test_sample-master.xlsm
Normal file
BIN
job3/add-pp7/test_sample-master.xlsm
Normal file
Binary file not shown.
BIN
job3/add-pp7/test_sample.xlsx.obsolete
Normal file
BIN
job3/add-pp7/test_sample.xlsx.obsolete
Normal file
Binary file not shown.
BIN
job3/add-pp7/try2/202212 monthly report - Template-try2.xlsm
Normal file
BIN
job3/add-pp7/try2/202212 monthly report - Template-try2.xlsm
Normal file
Binary file not shown.
BIN
job3/add-pp7/try2/Template(R1).pptx
Normal file
BIN
job3/add-pp7/try2/Template(R1).pptx
Normal file
Binary file not shown.
BIN
job3/add-pp7/try2/Template(R1)result.pptx
Normal file
BIN
job3/add-pp7/try2/Template(R1)result.pptx
Normal file
Binary file not shown.
BIN
job4/demo/202212 monthly report - Template-try1.xlsm
Normal file
BIN
job4/demo/202212 monthly report - Template-try1.xlsm
Normal file
Binary file not shown.
BIN
job4/demo/Template(R1).pptx
Normal file
BIN
job4/demo/Template(R1).pptx
Normal file
Binary file not shown.
BIN
job4/demo/Template(R1)_result.pptx
Normal file
BIN
job4/demo/Template(R1)_result.pptx
Normal file
Binary file not shown.
29
meta.md
Normal file
29
meta.md
Normal file
@@ -0,0 +1,29 @@
|
||||
---
|
||||
tags: [excel, vba]
|
||||
---
|
||||
|
||||
# leewinnie818
|
||||
|
||||
### history
|
||||
|
||||
原則上我唔想表現到改小小野都要收錢
|
||||
但係坦白講改完要全部對一轉都係工作量
|
||||
不如我
|
||||
|
||||
1
|
||||
0
|
||||
-1
|
||||
|
||||
1.99999
|
||||
-1.99999
|
||||
|
||||
99999
|
||||
-99999
|
||||
|
||||
101%
|
||||
100%
|
||||
0.1%
|
||||
0%
|
||||
-0.1%
|
||||
-100%
|
||||
-101%
|
22
package.json
Normal file
22
package.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"name": "daniel_jo_assignment_student",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"directories": {
|
||||
"doc": "docs"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"gitUpdate": "git add . && git commit -m\"update leewinnie818,\" && git push"
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@fortawesome/free-solid-svg-icons": "^6.2.1",
|
||||
"@fortawesome/react-fontawesome": "^0.2.0",
|
||||
"bootstrap": "^5.2.3",
|
||||
"react-bootstrap": "^2.6.0"
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user