I'm doing a small project where I collect data from a sensor and I want to send the data to a computer. I know i can probably just read in a stream of data from terminal, but is it possible for the xbee to write the sensor data from the arduino to a file on my PC?
but is it possible for the xbee to write the sensor data from the arduino to a file on my PC?
No. Not directly. One XBee is not particularly useful. You need a pair of them. One is connected to the Arduino with the sensor, or connected directly to the sensor. One is connected to a USB Explorer attached to the PC (or another Arduino attached to the PC). The XBee (or XBee and Arduino) writes to the serial port.
Some application on the PC needs to be listening to the serial port, and doing something with the data that comes in. That might include writing it to a file.