PASTEBIN
| #1 paste tool since 2002
create new paste
tools
api
archive
real-time
faq
PASTEBIN
create new paste
trending pastes
sign up
login
my settings
my profile
Public Pastes
How to get rss fee...
2 sec ago
Download Project X...
MySQL | 13 sec ago
to call another ac...
8 sec ago
Untitled
PHP | 19 sec ago
Untitled
13 sec ago
Setinterval and ge...
15 sec ago
Untitled
18 sec ago
Type lists in C#'s...
21 sec ago
New Paste
Rem ***** BASIC ***** Sub TiddlyWikiExport() ' Dimension all variables Dim TableData As String Dim ColumnCount As Integer Dim RowCount As Integer Dim ClipboardData As New DataObject ' Loop for each row in selection For RowCount = 1 To Selection.Rows.Count ' Write the initial table tag TableData = TableData & "|" ' Loop for each column in selection For ColumnCount = 1 To Selection.Columns.Count ' Do header formatting for the first row If RowCount = 1 Then TableData = TableData & "!" Else ' Write the background color tag If Selection.Cells(RowCount, ColumnCount).Interior.Color <> vbWhite Then ColorToRGB CStr(Selection.Cells(RowCount, ColumnCount).Interior.Color), r, g, b TableData = TableData & "bgcolor(#" & r & g & b & "): " End If ' Write the initial bold tag If Selection.Cells(RowCount, ColumnCount).Font.Bold = True Then TableData = TableData & "''" End If ' Write the initial italics tag If Selection.Cells(RowCount, ColumnCount).Font.Italic = True Then TableData = TableData & "//" End If ' Write the initial strikethrough tag If Selection.Cells(RowCount, ColumnCount).Font.Strikethrough = True Then TableData = TableData & "---" End If ' Set right alignment If Selection.Cells(RowCount, ColumnCount).HorizontalAlignment = xlRight Or _ Selection.Cells(RowCount, ColumnCount).HorizontalAlignment = xlCenter Then TableData = TableData & " " End If ' Write the initial font color tag If Selection.Cells(RowCount, ColumnCount).Font.Color <> vbBlack Then ColorToRGB CStr(Selection.Cells(RowCount, ColumnCount).Font.Color), r, g, b TableData = TableData & "@@color(#" & r & g & b & "):" End If ' Write the initial hyperlink tag If Selection.Cells(RowCount, ColumnCount).Hyperlinks.Count > 0 Then TableData = TableData & "[[" End If End If ' Write current cell's text @@ content = Replace(Selection.Cells(RowCount, ColumnCount).Text, Chr$(10), "<br>") TableData = TableData & content If RowCount <> 1 Then ' Write the initial hyperlink tag If Selection.Cells(RowCount, ColumnCount).Hyperlinks.Count > 0 Then TableData = TableData & "|" & Selection.Cells(RowCount, ColumnCount).Hyperlinks(1).Address & "]]" End If ' Write the ending font color tag If Selection.Cells(RowCount, ColumnCount).Font.Color <> vbBlack Then TableData = TableData & "@@" End If ' Set left alignment If Selection.Cells(RowCount, ColumnCount).HorizontalAlignment = xlLeft Or _ Selection.Cells(RowCount, ColumnCount).HorizontalAlignment = xlCenter Then TableData = TableData & " " End If ' Write the ending strikethrough tag If Selection.Cells(RowCount, ColumnCount).Font.Strikethrough = True Then TableData = TableData & "---" End If ' Write the ending italic tag If Selection.Cells(RowCount, ColumnCount).Font.Italic = True Then TableData = TableData & "//" End If ' Write the ending bold tag If Selection.Cells(RowCount, ColumnCount).Font.Bold = True Then TableData = TableData & "''" End If End If ' Write the ending table separator TableData = TableData & "|" ' Check if cell is in last column If ColumnCount = Selection.Columns.Count Then ' If so then write a blank line TableData = TableData & Chr$(10) End If ' Start next iteration of ColumnCount loop Next ColumnCount ' Start next iteration of RowCount loop Next RowCount ' Copy data to the clipboard ClipboardData.SetText TableData ClipboardData.PutInClipboard End Sub Sub ColorToRGB(ByVal Color As String, ByRef r, ByRef g, ByRef b) On Error GoTo Solution Dim SStr As String SStr = "000000" & Hex(Color) SStr = Right(SStr, 6) b = Mid(SStr, 1, 2) g = Mid(SStr, 3, 2) r = Mid(SStr, 5, 2) If Len(r) < 2 Then r = "0" & r If Len(g) < 2 Then g = "0" & g If Len(b) < 2 Then b = "0" & b Solution: If Err.Number <> 0 Then r = -1 g = -1 b = -1 End If End Sub
Optional Paste Settings
Syntax Highlighting:
None
Bash
C
C#
C++
CSS
HTML
HTML 5
Java
JavaScript
Lua
None
Perl
PHP
Python
Rails
-------------
4CS
6502 ACME Cross Assembler
6502 Kick Assembler
6502 TASM/64TASS
ABAP
ActionScript
ActionScript 3
Ada
ALGOL 68
Apache Log
AppleScript
APT Sources
ASM (NASM)
ASP
autoconf
Autohotkey
AutoIt
Avisynth
Awk
BASCOM AVR
Bash
Basic4GL
BibTeX
Blitz Basic
BNF
BOO
BrainFuck
C
C for Macs
C Intermediate Language
C#
C++
C++ (with QT extensions)
C: Loadrunner
CAD DCL
CAD Lisp
CFDG
ChaiScript
Clojure
Clone C
Clone C++
CMake
COBOL
CoffeeScript
ColdFusion
CSS
Cuesheet
D
DCS
Delphi
Delphi Prism (Oxygene)
Diff
DIV
DOS
DOT
E
ECMAScript
Eiffel
Email
EPC
Erlang
F#
Falcon
FO Language
Formula One
Fortran
FreeBasic
FreeSWITCH
GAMBAS
Game Maker
GDB
Genero
Genie
GetText
Go
Groovy
GwBasic
Haskell
HicEst
HQ9 Plus
HTML
HTML 5
Icon
IDL
INI file
Inno Script
INTERCAL
IO
J
Java
Java 5
JavaScript
jQuery
KiXtart
Latex
Liberty BASIC
Linden Scripting
Lisp
LLVM
Loco Basic
Logtalk
LOL Code
Lotus Formulas
Lotus Script
LScript
Lua
M68000 Assembler
MagikSF
Make
MapBasic
MatLab
mIRC
MIX Assembler
Modula 2
Modula 3
Motorola 68000 HiSoft Dev
MPASM
MXML
MySQL
newLISP
None
NullSoft Installer
Oberon 2
Objeck Programming Langua
Objective C
OCalm Brief
OCaml
OpenBSD PACKET FILTER
OpenGL Shading
Openoffice BASIC
Oracle 11
Oracle 8
Oz
Pascal
PAWN
PCRE
Per
Perl
Perl 6
PHP
PHP Brief
Pic 16
Pike
Pixel Bender
PL/SQL
PostgreSQL
POV-Ray
Power Shell
PowerBuilder
ProFTPd
Progress
Prolog
Properties
ProvideX
PureBasic
PyCon
Python
q/kdb+
QBasic
R
Rails
REBOL
REG
Robots
RPM Spec
Ruby
Ruby Gnuplot
SAS
Scala
Scheme
Scilab
SdlBasic
Smalltalk
Smarty
SQL
SystemVerilog
T-SQL
TCL
Tera Term
thinBasic
TypoScript
Unicon
UnrealScript
Vala
VB.NET
VeriLog
VHDL
VIM
Visual Pro Log
VisualBasic
VisualFoxPro
WhiteSpace
WHOIS
Winbatch
XBasic
XML
Xorg Config
XPP
YAML
Z80 Assembler
ZXBasic
Paste Expiration:
Never
10 Minutes
1 Hour
1 Day
1 Month
Paste Exposure:
Public
Unlisted
Private (members only)
Paste Name / Title:
Hello
Guest
Sign Up
or
Login
You are currently not logged in, this means you can not edit or delete anything you paste.
Sign Up
or
Login