Skip to content

Instantly share code, notes, and snippets.

View English_num_to_word
Source: https://blog.hocexcel.online/doc-thanh-chu-bang-ham-trong-excel-bao-gom-tieng-anh-tieng-viet.html?hocexcelonline
copy only formula below and enter number in cell A2
=TRIM(IF(OR(LEN(FLOOR(A2,1))=13,FLOOR(A2,1)<=0),"Out of range",PROPER(SUBSTITUTE(CONCATENATE(
CHOOSE(MID(TEXT(INT(A2),REPT(0,12)),1,1)+1,"","one hundred ","two hundred ","three hundred ","four hundred ","five hundred ","six hundred ","seven hundred ","eight hundred ","nine hundred "),
CHOOSE(MID(TEXT(INT(A2),REPT(0,12)),2,1)+1,"",
CHOOSE(MID(TEXT(INT(A2),REPT(0,12)),3,1)+1,"ten","eleven","twelve","thirteen","fourteen","fifteen","sixteen","seventeen","eighteen","nineteen"),"twenty","thirty","forty","fifty","sixty","seventy","eighty","ninety"),IF(VALUE(MID(TEXT(INT(A2),REPT(0,12)),2,1))>1,
CHOOSE(MID(TEXT(INT(A2),REPT(0,12)),3,1)+1,"","-one","-two","-three","-four","-five","-six","-seven","-eight","-nine"),IF(VALUE(MID(TEXT(INT(A2),REPT(0,12)),2,1))=0,
CHOOSE(MID(TEXT(INT(A2),REPT(0,12)),3,1)+1,"","one","two","three","four","five","six","se
View GAS01.js
function myFunction() {
var x = 'Hello'; // Kiểu string
var z = 23; // Kiểu số, kiểu Number
var y = true; // Kiểu boolean
var array = ['Hello', 'World', 23, 4, false];
array[0] // 'Hello'
var obj = { 'firstName': 'Thanh', 'lastName': 'Nguyen' }
View example-for-editor.html
<p>Đây là một đoạn văn bình thường dành cho việc dẫn dắt</p>
<pre>Đây là một đoạn văn bình thường dành cho việc dẫn dắt</pre>
<blockquote>=SUM(A1:A10)</blockquote>
<pre style="background: rgb(0, 31, 63); color: white;"><p>=SUM(A1:A10)</p></pre>
<pre style="background: rgb(40, 41, 35); color: rgb(103, 216, 239);"><p><strong style="color: rgb(103, 216, 239);">=SUM(A1:A10)</strong></p></pre>
View heo-addin-manifest.xml
<?xml version="1.0" encoding="UTF-8"?>
<OfficeApp
xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0"
xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides"
xsi:type="TaskPaneApp">
<!-- Begin Basic Settings: Add-in metadata, used for all versions of Office unless override provided. -->
View test_xlsx_base64.txt
UEsDBBQABgAIAAAAIQA/qpqYigEAAPgFAAATAAgCW0NvbnRlbnRfVHlwZXNdLnhtbCCiBAIooAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACslMtuwjAQRfeV+g+Rt1Vi6KKqKgKLPpYtUukHmHhCosQPeYbX39dxAKEqJSDYxErsuedmxjOjyUbV0QoclkanbJgMWAQ6M7LUi5T9zD7iZxYhCS1FbTSkbAvIJuP7u9FsawEjH60xZQWRfeEcswKUwMRY0H4nN04J8q9uwa3IKrEA/jgYPPHMaAJNMTUabDx6g1wsa4reN/5z68RBjSx6bQ82rJQJa+syE+Sd8pWWfyjxjpD4yHAGi9Lig7fBeCeh2fkfsIv7
View insertSheets.js
$("#file").change(() => tryCatch(insertSheets));
async function insertSheets() {
const myFile = <HTMLInputElement>document.getElementById("file");
const reader = new FileReader();
reader.onload = (event) => {
Excel.run((context) => {
// strip off the metadata before the base64-encoded string
const startIndex = (<string>(<FileReader>event.target).result).indexOf("base64,");
View heo.xml
<?xml version="1.0" encoding="UTF-8"?>
<OfficeApp
xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0"
xmlns:ov="http://schemas.microsoft.com/office/taskpaneappversionoverrides"
xsi:type="TaskPaneApp">
<!-- Begin Basic Settings: Add-in metadata, used for all versions of Office unless override provided. -->
View myVlookup.bas
Function myVlookUp(lookup_value, lookup_range As Range, index_col As Long)
Dim x As Range
Dim result As String
result = ""
For Each x In lookup_range
If x = lookup_value Then
result = result & "," & x.Offset(0, index_col - 1)
End If
Next
myVlookUp = Right(result, Len(result) - 1)
View GetConnXLS.bas
Function GetConnXLS(ByVal cFileName As String, _
Optional ByVal InformErrMSG As Boolean = False)
On Error GoTo errHandling:
'Open ADO connection to excel workbook
Dim oConn As Object
Dim Ext As String, ConnStr As String
View option_base_1.bas
Dim arValues(10) As String 'mảng có 11 thành phần
' truy cập vào từng thành phần như sau - dùng index 0 .. 10
debug.print arValues(0)
debug.print arValues(1)
debug.print arValues(10)
Dim arValues(10) As String 'khai báo mảng có 11 thành phần
Dim arValues(0 To 10) As String 'khai báo mảng có 11 thành phần
You can’t perform that action at this time.