Watch the Uploading and Downloading Files with a Web App video. I currently have the following code (taken from the documentation) - code Dim f As FolderItem Dim textInput As TextInputStream Dim rowFromFile, oneCell As String Dim i As Integer f GetFolderItem(text/plain) //defined as a FileType If f <> Nil And f.Exists Then Dim tab As.To start the download, you call ShowURL and pass in the URL of the WebFile that you created.Įxamine the WebFileUploader example project (Examples/API/User Interface/Web) that shows you how to upload files to a web app.Įxamine the Downloading example project (Examples/Topics/Web/Downloading Files) that shows you how to download files from a web app. I’m a beginner and I need help writing code that allows me to parse CSV data for use in a WEB APP. You then want to set the WebFile.ForceDownload property to True so that the file is downloaded rather than displayed in the browser. This WebFile should be a Property of the WebPage so that it does not go out of scope while the file is downloading, which would cause an incomplete download. To make a file available for download, you first have to create a WebFile that refers to the file on the drive. When the upload has finished, the :ref:UploadFinished`` event handler is called where you can get a list of the files that were uploaded so that you can process them as necessary. You then add a button to the page that calls the WebFileUploader.StartUpload method on the control to actually upload the files to your web app on the server. This control provides a user interface for the user to select and add files to a list to be uploaded. To allow users to upload files to you web app, you use the WebFileUploader control. How do I upload and download files in a web app? My Code: Dim csvType As New FileType csvType.Name CSV File (.csv) csvType.MacType 'TEXT ' csvType.Extensions csv dim f as FolderItem dim s as string dim dlg as new OpenDialog dlg.Filter csvType f dlg.ShowModal if f <> nil and f.Reporting bugs and making feature requests Sorry for my newbieness, When you say Tabs instead comma, did you mean this: / Eg.Reading and writing data in JSON format. ![]() Accessing the file system via the FolderItem class.How do I upload and download files in a web app?.If ListBox1.ColumnCount 0 then 'code from Kem Kem I added you line of code, it kinda works, how do I remove all rows when I do a new search. ListBox1.Cell(ListBox1.ListCount - 1, i - 1) = oneCell There is no coding for this but I need it to compare text in a text box, and compare it to each line of text in the phonebook file and only return if there is a match.į = (“CBNphonebook2.txt”) //from XOJO forum This works but it takes every line and put 1st and last name in column 1 and phone in column 2. Listbox1.Cell(Listbox1.LastIndex,1) = "Data here goes in column 2 (1)" Listbox1.AddRow rowFromFile 'this put the whole line in column 1, I want 1st & last name in column1, number in column 2 ListBox1.ColumnCount = CountFields(rowFromFile, tab)įor i = 1 To CountFields(rowFromFile, tab) If ListBox1.ColumnCount < CountFields(rowFromFile, tab) Then ![]() ![]() TextInput.Encoding = Encodings.MacRoman // strings are MacRoman ![]() I want Shawn Brady in column 1 box, and phone number in column 2 box.į = (“CBNphonebook.txt”) //from XOJO forum Each line of text goes into column 1 box. Set the_list to the_list & return & the_array InStr on the html source and use Left(source,start,len) TIA. I do not have anything else to do with strings at all. Set the_array to the_name & tab & tab & " " & characters name_count thru -1 of a_paragraph In a DESKTOP application, I have to get the title tag string contents. Set the_name to word 1 of a_paragraph & " " & word 2 of a_paragraph Set the_phonebook to paragraphs of (read fileHandle) Set fileHandle to open for access theFile set theFile to ((path to desktop folder) & "phonebook.txt") as string If the line contains the name I am looking for, add the whole line to a list and display in a message box or list box
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |