Skip to content

Instantly share code, notes, and snippets.

<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>
<?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. -->
UEsDBBQABgAIAAAAIQA/qpqYigEAAPgFAAATAAgCW0NvbnRlbnRfVHlwZXNdLnhtbCCiBAIooAACAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACslMtuwjAQRfeV+g+Rt1Vi6KKqKgKLPpYtUukHmHhCosQPeYbX39dxAKEqJSDYxErsuedmxjOjyUbV0QoclkanbJgMWAQ6M7LUi5T9zD7iZxYhCS1FbTSkbAvIJuP7u9FsawEjH60xZQWRfeEcswKUwMRY0H4nN04J8q9uwa3IKrEA/jgYPPHMaAJNMTUabDx6g1wsa4reN/5z68RBjSx6bQ82rJQJa+syE+Sd8pWWfyjxjpD4yHAGi9Lig7fBeCeh2fkfsIv7
$("#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,");
<?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. -->
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)
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
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
function onOpen( ){
// This line calls the SpreadsheetApp and gets its UI
// Or DocumentApp or FormApp.
var ui = SpreadsheetApp.getUi();
//These lines create the menu items and
// tie them to functions we will write in Apps Script
ui.createMenu('Học Excel Online')
.addItem('1. formulasToValuesActiveSheet', 'formulasToValuesActiveSheet')
//10 reset all filters for a data range on current Sheet
function resetFilter() {
var sheet = SpreadsheetApp.getActiveSheet();
var range = sheet.getDataRange();
range.getFilter().remove();
range.createFilter();
}