You need to sign in to do that
Don't have an account?
sfdc_syed
I need to upload only csv file using apex alone how can i do that?
Hi guys,
i want upload only csv file format alone using apex how can i do that can any one let me know the step by using apex.
Thanks.
Hi,
So what do you want to say no intervention of visual force?
Points to ponder:-
Hope this helps...
Hi ,
i just want to know that how will apex know which file to upload i.e wether it is. csv file or not ?i need process of that how it will work and give me the example.
Thanks
Hi,
Uploading using apex alone means what ? ,
Do you want any UI for this or not ?
Sridhar Bonagiri
HI,
it meas that,i have scenario like uploading the data into custom object.wat i want is when browse any csv file how do i check whether it is csv file or not in apex?if it is csv file then only we can browse other wise it should display error message.so explain me with example i.e. apex code.
Thanks
Hi,
you can store the file name in a field asnd then using string function check the extension if its .csv you can go ahead and can have robust error handling to tide over any other exception encountered.
Hope this helps....
Hi,
Can you explain me with apex code i.e. how apex know whether it is csv file or not?
Thanks
Hi Syed,
I think you will be using some UI to upload the documents , as you upload your file surely the name of the file will also get captured and its not getting captured develop custom code to get it done ensure iots not editable by users . Now you can make use of this filename to verify if the file is csv or not. further more to make error handling foolproof you can ensure proper error handling so that if somehow a non-csv file gets uploaded you can generate proper error messages.
Hope this helps....