LibreOffice 7.2 Help
Writes data to a sequential text file with delimiting characters.
Write [#fileNum] {,|;} expression [, β¦]
fileNum: Any numeric expression that contains the file number that was set by the Open statement for the respective file.
expression list: Variables or expressions that you want to enter in a file, separated by commas.
ννμ λͺ©λ‘μ΄ μλ΅λ κ²½μ° Write λ¬Έμ νμΌμ λΉ μ€μ μΆκ°ν©λλ€.
μ λͺ©λ‘μ μ νμΌμ΄λ κΈ°μ‘΄ νμΌμ μΆκ°νλ €λ©΄ νμΌμ Output λλ Append λͺ¨λλ‘ μ΄μ΄μΌ ν©λλ€.
μμ±νλ λ¬Έμμ΄μ λ°μ΄νλ‘ λ¬Άμ΄κ³ μΌνλ‘ κ΅¬λΆλ©λλ€. ννμ λͺ©λ‘μ μ΄ κ΅¬λΆ κΈ°νΈλ₯Ό μ λ ₯ν νμλ μμ΅λλ€.
κ° Write λ¬Έμλ λ§μ§λ§ νλͺ©μΌλ‘ μ€ λ κΈ°νΈκ° μΆλ ₯λ©λλ€.
μμμ μ κ°λ μλ κ΅κ°λ³ μ€μ μ λ°λΌ λ³νλ©λλ€.
Sub ExampleWrite
Dim iCount As Integer
Dim sValue As String
iCount = Freefile
Open "C:\Users\ThisUser\data.txt" For Output As iCount
sValue = "Hamburg"
Write #iCount,sValue,200
sValue = "New York"
Write #iCount,sValue,300
sValue = "Miami"
Write #iCount,sValue,450
Close #iCount
End Sub
Sub ExampleWrite
Dim iCount As Integer
Dim sValue As String
iCount = Freefile
Open "~/data.txt" For Output As iCount
sValue = "Hamburg"
Write #iCount,sValue,200
sValue = "New York"
Write #iCount,sValue,300
sValue = "Miami"
Write #iCount,sValue,450
Close #iCount
End Sub